home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-12-31 | 194.2 KB | 7,371 lines |
- *** /usr/storm/nn6.3.0/INSTALLATION Thu Jun 1 11:10:40 1989
- --- INSTALLATION Fri Sep 8 12:46:39 1989
- ***************
- *** 46,71 ****
- --- 46,89 ----
- Among the things you have to select are two system and machine
- dependent files. The following system files are delivered with nn:
-
- + s-3b1g.h For 3b1 (unix-pc) with GCC.
- + s-aux1-1.h For A/UX 1.1
- s-bsd4-2.h For 4.2 BSD and Ultrix systems
- s-bsd4-3.h For 4.3 BSD systems
- + s-dnix5-2.h For dnix on DIAB DS90-10.
- + s-dynix3-0.h For Dynix 3.0 on Symmetry.
- + s-fortune.h For Fortune 32:16 [read comments in the file]
- s-hpux.h For HPUX (series 320)
- s-hpux2-1.h For HPUX 2.1 (series 800)
- + s-hpux3-0.h For HPUX 3.0 (series 800)
- + s-pyramid.h For Pyramid (and Targon 35).
- + s-sgi4D.h For IRIX 3.1/3.2 [read comments in the file]
- s-sunos3.h For SunOS 3
- s-sunos4-0.h For SunOS 4.0
- s-tower32.h For NCR tower
- + s-uport2-2.h For Microport UNIX V.2
- s-usg3-1.h For most system V systems (also 2.2)
- + s-xenix386.h For xenix386 [termcap version].
- + s-xenix386ds.h For Xenix386 2.3.2 w/dev system [try it out!].
-
- The following machine description files are delivered with nn:
-
- + m-3b1g.h For 3b1 (unix-pc) with GCC [no networking].
- m-att3b.h For AT&T 3b2 (with s-usg3-1.h)
- + m-convex.h For Convex.
- m-dec3100.h For DECstation 3100 (with s-bsd4-2.h)
- m-gould.h For Gould PN6000 (with s-bsd4-3.h)
- m-hp9000.h For HP9000 series 320 and 800 (at least)
- + m-i80286.h For Intel 80286 processors [no network support]
- m-m680x0.h For 68000 family processors
- + m-pyramid.h For Pyramid (and Targon 35).
- + m-sgi4D.h For Silicon Graphics 4D series.
- m-sparc.h For SPARC processors
- m-sun.h For 680x0 based SUNs
- m-sun386i.h For 80386 based SUNs
- + m-symmetry.h For Sequent Symmetry.
- m-vax.h For VAX family
- + m-xenix386.h For XENIX 386 [no network support]
-
- If you cannot use one of these configuration files, create your own
- based on the following template files (send the new system and/or
- ***************
- *** 321,326 ****
- --- 339,345 ----
- $ make all
- $ su
- # make install
- + # make online
-
- To be able to install a new nnmaster, the currently running master (if
- any) will be stopped automatically, and it has to be started manually
- *** /usr/storm/nn6.3.4/MANIFEST Mon Jul 10 13:36:15 1989
- --- MANIFEST Fri Sep 8 12:46:39 1989
- ***************
- *** 46,51 ****
- --- 46,52 ----
- keymap.h
- kill.c
- log_entry.c
- + m-3b1g.h
- m-att3b.h
- m-convex.h
- m-dec3100.h
- ***************
- *** 53,58 ****
- --- 54,60 ----
- m-hp9000.h
- m-i80286.h
- m-m680x0.h
- + m-pyramid.h
- m-sgi4D.h
- m-sparc.h
- m-sun.h
- ***************
- *** 100,105 ****
- --- 102,108 ----
- regexp.h
- reroute.c
- routes.sample
- + s-3b1g.h
- s-aux1-1.h
- s-bsd4-2.h
- s-bsd4-3.h
- ***************
- *** 109,114 ****
- --- 112,118 ----
- s-hpux.h
- s-hpux2-1.h
- s-hpux3-0.h
- + s-pyramid.h
- s-sgi4D.h
- s-sunos3.h
- s-sunos4-0.h
- ***************
- *** 117,122 ****
- --- 121,127 ----
- s-uport2-2.h
- s-usg3-1.h
- s-xenix386.h
- + s-xenix386ds.h
- save.c
- selection.c
- sequence.c
- *** /usr/storm/nn6.3.0/NNTP Thu Jun 1 11:10:40 1989
- --- NNTP Fri Sep 8 12:46:40 1989
- ***************
- *** 1,17 ****
- NNTP SUPPORT
- ------------
-
- ! This file describes the NNTP support available in nn release 6.3.
- ! The NNTP support was implemented by Rene Seindal, seindal@diku.dk
-
-
- PREREQUISITES
- -------------
-
- ! Before you can use the NNTP part of nn, you need to get and install
- ! the nntp-1.5 distribution with patches 1-3. It is available from
- ! several ftp-sites in the USA. It is also available on freja.diku.dk
- ! (ip 129.142.96.1) together with the nn 6.3 distribution.
-
- You also need read-access to an NNTP-server.
-
- --- 1,17 ----
- NNTP SUPPORT
- ------------
-
- ! This file describes the NNTP support available in nn release 6.3. The
- ! NNTP support was implemented by Rene' Seindal, seindal@diku.dk
-
-
- PREREQUISITES
- -------------
-
- ! Before you can use the NNTP part of nn, you need to get and install the
- ! nntp-1.5 distribution with patches 1-3. It is available from several
- ! ftp-sites in the USA. It is also available on freja.diku.dk (ip
- ! 129.142.96.1) together with the nn 6.3 distribution.
-
- You also need read-access to an NNTP-server.
-
- ***************
- *** 26,45 ****
-
- When the master is set up to use NNTP, it will connect to the NNTP-
- server in each iteration of the collection (the interval set with -r),
- ! get a copy of the active file, and incorporate the new articles into
- ! the database. To do this, the master will temporarily transfer one
- ! article at a time from the NNTP-server to the local system.
-
- When the articles are read with nn, it will use the local database to
- present the menus, and fetch the articles from the NNTP-server as they
- ! are requested by the user. It will connect to the NNTP server the
- ! first time it is necessary to fetch an article.
-
- Neither nnmaster, nor nn will use NNTP if they run on the NNTP-server
- itself (they will directly access the news files).
-
- ! Both nn and nnmaster access the server in reading mode. The master
- ! and all client MUST use the same server at all times, since the local
- database contains article numbers, that are only unique for each
- NNTP-server.
-
- --- 26,45 ----
-
- When the master is set up to use NNTP, it will connect to the NNTP-
- server in each iteration of the collection (the interval set with -r),
- ! get a copy of the active file, and incorporate the new articles into the
- ! database. To do this, the master will temporarily transfer one article
- ! at a time from the NNTP-server to the local system.
-
- When the articles are read with nn, it will use the local database to
- present the menus, and fetch the articles from the NNTP-server as they
- ! are requested by the user. It will connect to the NNTP server the first
- ! time it is necessary to fetch an article.
-
- Neither nnmaster, nor nn will use NNTP if they run on the NNTP-server
- itself (they will directly access the news files).
-
- ! Both nn and nnmaster access the server in reading mode. The master and
- ! all client MUST use the same server at all times, since the local
- database contains article numbers, that are only unique for each
- NNTP-server.
-
- ***************
- *** 47,64 ****
- SHARING THE DATABASE
- --------------------
-
- ! You must also decide whether you want to share the database between
- ! your local news clients, and how you are going to do it.
-
- ! The database will take up some disk space, normally about 1Mb per
- ! 10.000 articles. There are several ways to manage this space.
- !
- ! This simplest solution, is to let each client run it own master,
- ! i.e., have its own database. This means, of course, no sharing.
-
- ! Alternatively, one host can run the master, and distribute the
- ! database to the others via e.g., rdist. This doesn't save disk space,
- ! but saves load on the NNTP-server.
-
- Last, the database can be shared with NFS/RFS (see the description of
- NETWORK_DATABASE in the config.h file).
- --- 47,64 ----
- SHARING THE DATABASE
- --------------------
-
- ! You must also decide whether you want to share the database between your
- ! local news clients, and how you are going to do it.
-
- ! The database will take up some disk space, normally about 1Mb per 10.000
- ! articles. There are several ways to manage this space.
- !
- ! This simplest solution, is to let each client run it own master, i.e.,
- ! have its own database. This means, of course, no sharing.
-
- ! Alternatively, one host can run the master, and distribute the database
- ! to the others via e.g., rdist. This doesn't save disk space, but saves
- ! load on the NNTP-server.
-
- Last, the database can be shared with NFS/RFS (see the description of
- NETWORK_DATABASE in the config.h file).
- ***************
- *** 77,110 ****
- NNTP
- You enable the use of NNTP by defining the macro NNTP.
-
- ! NNTP_SERVER
- Both the master and the clients will look up their NNTP-server
- ! in the file given by the macro NNTP_SERVER. If the name is
- ! not an absolute path name, it is taken to be relative to
- LIB_DIRECTORY.
- !
- The format of the file is compatible with the one used in
- clientlib.c in the nntp-1.5 distribution, i.e., the first
- ! non-blank line, not starting with '#' is taken to be the name
- ! of the NNTP-server. This file MUST be present, and must
- ! contain a valid host name.
-
-
- ! Tuning
- ! ------
-
- Both the server and each client maintains a cache of recently accessed
- articles, to minimize communication with the server (mainly to avoid
- fetching large digests continuously). The master needs the cache when
- ! it splits digests, and the clients need it, because nn has a tendency
- ! to reopen the articles several times.
-
- ! The master's cache is kept in LIB_DIRECTORY, and each client's cache
- ! are kept in the users .nn directory. The constant NNTPCACHE (defined
- ! in nntp.c but can be redefined in config.h) defines the size of the
- ! cache, whose optimal size depends on the amount of news kept on line
- ! on the NNTP-server. Values of 5-10 gives reasonable results. The
- ! effect is most striking when reading digested news.
-
-
- INSTALLATION
- --- 77,122 ----
- NNTP
- You enable the use of NNTP by defining the macro NNTP.
-
- ! NNTP_SERVER
- Both the master and the clients will look up their NNTP-server
- ! in the file given by the macro NNTP_SERVER. If the name is not
- ! an absolute path name, it is taken to be relative to
- LIB_DIRECTORY.
- !
- The format of the file is compatible with the one used in
- clientlib.c in the nntp-1.5 distribution, i.e., the first
- ! non-blank line, not starting with '#' is taken to be the name of
- ! the NNTP-server. This file MUST be present, and must contain a
- ! valid host name.
- !
- ! NNTP_POST
- ! If you use the NNTP based inews (part on the NNTP distribution)
- ! and you have hosts that are not allowed to post to the NNTP
- ! server, you should defined this. It will make nn check at
- ! connect time whether the NNTP server allows postings, and reject
- ! all attempts to post, if the server disallows posting. If you
- ! do not define this, users will be allowed to post by nn, but the
- ! posting will eventually fail.
- !
- ! Again, this parameter is only relevant, if you use the NNTP
- ! based inews, and have hosts that are not allowed to post.
-
-
- ! TUNING
- ! ------
-
- Both the server and each client maintains a cache of recently accessed
- articles, to minimize communication with the server (mainly to avoid
- fetching large digests continuously). The master needs the cache when
- ! it splits digests, and the clients need it, because nn has a tendency to
- ! reopen the articles several times.
-
- ! The master's cache is kept in LIB_DIRECTORY, and each client's cache are
- ! kept in the users .nn directory. The constant NNTPCACHE (defined in
- ! nntp.c but can be redefined in config.h) defines the size of the cache,
- ! whose optimal size depends on the amount of news kept on line on the
- ! NNTP-server. Values of 5-10 gives reasonable results. The effect is
- ! most striking when reading digested news.
-
-
- INSTALLATION
- ***************
- *** 117,157 ****
- Notice however, that the NNTP_SERVER file must be properly initialized
- before doing the 'make initdb'.
-
- ! If something goes wrong in the initialization of the database, you
- ! will have to run 'nnmaster -I' again by hand.
-
-
- PROBLEMS
- --------
-
- ! There are some problems with the current implementation, mostly in
- ! connection with error conditions. Almost any error will cause a
- ! panic-like reaction. The master simply closes the connection and
- ! returns to the main loop, and nn terminates the session.
-
- ! The client program, nn, has a simple attitude towards such accidents.
- ! It prints a message, clears the cache, and exits. This means that you
- ! can't have an nn suspended for very long before the connection times
- ! out, and nn will exit the next time you try to access an article.
- ! This is clearly wrong. It should at least just close the connection,
- ! and reopen it the next time a request to the server comes in.
- !
- ! In spite of these drawbacks, in general it works ok. The NNTP code
- ! has been in use for several months now, in a generally satisfying
- ! manner.
- !
- ! Alternative implementations can be conceived, especially in the
- ! master. The master normally collects articles by rereading the active
- ! file, looking for changed article numbers. For each group with new
- ! articles, it reads the new articles and adds them to the database.
- ! This scheme has been kept in the NNTP-based master, to keep the
- ! changes at a minimum.
-
- An alternative solution could be to use NEWNEWS to get a list of new
- ! articles since last collect, and fetch each article in sequence. This
- ! requires the NNTP-server to return the article number in the response
- ! to an ARTICLE request (as required in rfc 977), but apparently version
- ! 1.5 of the NNTP-server does not do this.
-
- ! Suggestions and improvements are very much welcome. Send your
- contributions to nn-bugs@dkuug.dk.
- --- 129,207 ----
- Notice however, that the NNTP_SERVER file must be properly initialized
- before doing the 'make initdb'.
-
- ! If something goes wrong in the initialization of the database, you will
- ! have to run 'nnmaster -I' again by hand.
- !
- !
- ! ERROR HANDLING
- ! --------------
- !
- ! The handling of errors have been improved since the initial release.
- !
- ! The master will handle most errors by closing the connection, and
- ! returning to the main loop. All errors in the master are logged, with a
- ! code of `N,' so they can be inspected with the (undocumented?) `n'
- ! command in nnadmin's Log menu.
- !
- ! A few errors are considere fatal. If any of these occur operation will
- ! be discontinued. These errors are such as failure to find the NNTP
- ! server, failure to find the NNTP service, and responses from the NNTP
- ! server in the 500 range (ill-formed requests, access denied, ...)
- !
- ! NNTP server timeouts are handled specially. If the NNTP server times
- ! out, both nn and the master will attempt to restart it (by connecting
- ! again). This shouldn't happen in the master (which won't leave sockets
- ! idle for that long), but it can easily happen in nn, if it is left
- ! suspended for too long. If the server responds with code 400 (Service
- ! discontinued), a reconnect is also tried.
-
-
- PROBLEMS
- --------
-
- ! I am not certain what should happen if the server sends back responses
- ! in the 1xx range. I do not know whether a NNTP server is allowed to
- ! return one of these responses on its own initiative. If it is, nn
- ! should probably ignore (or display) the messages. Currently, nothing is
- ! done to treat these responses in any way.
- !
- ! I have seen a strange thing happen to the master, which I have not been
- ! able to reproduce. The master ran on a Sun-4 running SunOS 4.0, and the
- ! NNTP server was a VAX 785 running MORE/bsd. The NNTP software was
- ! version 1.5.3. The master was stuck in a read from the NNTP server. A
- ! netstat on the Sun show an established connection to nntpd on the Vax,
- ! but a netstat on the Vasx did not show any NNTP connections. There was
- ! no nntpd running, and no messages on the console indicating any
- ! failures.
- !
- ! If you see this happen, please compile nntp.c with the macro DEBUG
- ! defined, and relink the master. The master will then leave a transcript
- ! of the conversation between the master and the NNTP server in
- ! /usr/tmp/nnmaster.log. If the master gets stuck again, save this file
- ! before you restart the master, and send it to me. The file is truncated
- ! each time the master connects to the NNTP server, so it won't fill up
- ! your disk. If you compile nn with nntp debug enabled, it will be a very
- ! annoying program, so you probably don't want to do that.
- !
- !
- ! ALTERNATIVES
- ! ------------
-
- ! Alternative implementations can be conceived, especially in the master.
- ! The master normally collects articles by rereading the active file,
- ! looking for changed article numbers. For each group with new articles,
- ! it reads the new articles and adds them to the database. This scheme
- ! has been kept in the NNTP-based master, to keep the changes at a
- ! minimum.
-
- An alternative solution could be to use NEWNEWS to get a list of new
- ! articles since last collect, and fetch each article in sequence. The
- ! newsgroups and article numbers within each group could then be found in
- ! the Xref: field. This would probably improve efficiency, since the
- ! master would then generate fewer failing requests (for non-existent
- ! articles), and it would only read cross-posted articles once. This
- ! solution would, however, require some surgery on the current structure
- ! of the masters main loop.
-
- ! Suggestions and improvements are very much welcome. Send your ideas or
- contributions to nn-bugs@dkuug.dk.
- *** /usr/storm/nn6.3.0/PROBLEMS Thu Jun 1 11:10:40 1989
- --- PROBLEMS Fri Sep 8 12:46:40 1989
- ***************
- *** 2,7 ****
- --- 2,24 ----
- installation and operation of nn in the past.
-
-
- + RUNNING NN ON 80286
- + -------------------
- +
- + The system and machine file for a '286 running Microport UNIX V/AT are
- + s-uport2-2.h and m-i80286.h, but to get it running you probably have
- + to do the following things as well:
- +
- + - tgetstr.o in libcurses is broken in 2.4.
- + Get an old version (e.g. 1.3) and replaced tgetstr.o.
- +
- + - Use the m286 malloc posted recently to comp.sources.misc
- +
- + Thanks to Wietse Z. Venema and Miek Grenier for a lot of work on
- + locating and fixing 16/32 bit problems in nn which caused it not to
- + work on the '286.
- +
- +
- FILE PERMISSIONS
- ----------------
-
- ***************
- *** 94,103 ****
- clearing the message, and should offer the possibility to
- re-try the operation (which usually then works for us).
-
-
-
- ! ECHOING TYPED CHARACTERS
- ! ------------------------
-
- nn does not echo the characters you type except when you are entering
- a string, e.g. a file name. Instead it attempts to make a significant
- --- 111,122 ----
- clearing the message, and should offer the possibility to
- re-try the operation (which usually then works for us).
-
- + There is a similar option [-y] to nnmaster which can be set to have
- + the nnmaster perform retries as well.
-
-
- ! TERMINAL I-O PROBLEMS
- ! ---------------------
-
- nn does not echo the characters you type except when you are entering
- a string, e.g. a file name. Instead it attempts to make a significant
- ***************
- *** 104,130 ****
- change to the data displayed on the screen. On a slow system this may
- be seen as a drawback; on fast systems it is an intended feature!
-
- nn uses raw mode when reading from the keyboard and cooked mode when
- ! printing on the screen (it flips forth and back). This has caused
- problems on some systems (e.g. the 3B2) where the tty driver is
- located on a dedicated IOprocessor, which for some reason handles
- ioctl's "out of band". I have tried to work around these problems by
- outputting \r\n sequences where \n should have been sufficient.
-
- ! nn also intentionally discards type-ahead at certain points.
-
- On some systems, TCSETAF also flushes the output queue; you may try to
- replace it by TCSETAW followed by TCFLSH.
-
-
- ! NNMASTER WILL NOT START
- ! -----------------------
-
- If no nnmaster is running, and nnmaster refuses to start up, you
- should check for the existence of the MPID file in the LIB directory,
- If it exists, it should be removed.
-
-
- WARNINGS DURING COMPILATION
- ---------------------------
-
- --- 123,184 ----
- change to the data displayed on the screen. On a slow system this may
- be seen as a drawback; on fast systems it is an intended feature!
-
- + If CBREAK is available, nn will use it, but when CBREAK is not avaiable
- nn uses raw mode when reading from the keyboard and cooked mode when
- ! printing on the screen (it flips forth and back). [This behaviour can
- ! be disabled by unsetting the flow-control variable] This has caused
- problems on some systems (e.g. the 3B2) where the tty driver is
- located on a dedicated IOprocessor, which for some reason handles
- ioctl's "out of band". I have tried to work around these problems by
- outputting \r\n sequences where \n should have been sufficient.
-
- ! nn also intentionally discards type-ahead at certain points, but only
- ! if CBREAK mode is not supported, and the flow-control variable is set.
-
- On some systems, TCSETAF also flushes the output queue; you may try to
- replace it by TCSETAW followed by TCFLSH.
-
- + On terminals where the left arrow key sends a backspace (such as
- + Wyse50), the backspace key will not properly work as the erase key.
- + To circumvent this problem on these terminals, place the following
- + line in your init file:
- + set erase-key left
- +
- +
- + Cnews
- + ------
- +
- + nn wants articles to contain Lines: headers, but Cnews doesn't
- + generate these in the default setup. You may uncomment the
- + Lines: code in the inews script.
- +
- + As distributed, Cnews does not maintain the 'min' value in the active
- + file - there is a program named `upact' to do this. Without it,
- + expire on the database will not be performed. One of the Cnews
- + patches is said to have changed this, but check it out.
- +
-
- ! NNMASTER WILL NOT START OR IS LOOPING
- ! -------------------------------------
-
- If no nnmaster is running, and nnmaster refuses to start up, you
- should check for the existence of the MPID file in the LIB directory,
- If it exists, it should be removed.
-
- + If nnmaster starts looping, you should check the permissions on the
- + LIB directory and notice if a GATE file exists which nnmaster is not
- + allowed to unlink.
-
- +
- + NNMASTER DIES WHEN STARTED FROM A TERMINAL
- + ------------------------------------------
- +
- + The definition DETATCH_TERMINAL in the s- file you use may not work
- + (it is a no-op on some systems). This will cause a hangup signal to
- + be sent to the master when you logout, and that will terminate the
- + master.
- +
- +
- WARNINGS DURING COMPILATION
- ---------------------------
-
- ***************
- *** 138,144 ****
-
- If the linker complains about not finding the function `strcspn'
- (whice should be in most standard libraries these days), define the
- ! symbol STRCSPN in config.h to use the version in regexp.c.
-
-
- FORMATTING THE MANUALS
- --- 192,199 ----
-
- If the linker complains about not finding the function `strcspn'
- (whice should be in most standard libraries these days), define the
- ! symbol STRCSPN in the m- file (or config.h) to use the version in
- ! regexp.c.
-
-
- FORMATTING THE MANUALS
- ***************
- *** 162,173 ****
- NNMASTER AND NN DOES NOT FIND ANY NEWS
- --------------------------------------
-
- ! This problem has been seen on some Xenix ports. I have not had the
- ! time to dig further into this problem. If you succeeds in porting nn
- ! to Xenix (286/386), send me the patches + s- and m- files.
-
- ! In release 6.3, some changes to the way files are opened may solve
- ! this problem, but I have not tested 6.3 on Xenix.
-
-
- THE DATABASE BECOMES CORRUPTED FOR NO APPARENT REASON
- --- 217,226 ----
- NNMASTER AND NN DOES NOT FIND ANY NEWS
- --------------------------------------
-
- ! All known occurrences of this problem have been identified and fixed.
-
- ! Be careful about the 'limit' and 'old' variables. Setting them in the
- ! init file may cause nn to behave strangely (as documented :-)
-
-
- THE DATABASE BECOMES CORRUPTED FOR NO APPARENT REASON
- ***************
- *** 191,197 ****
- --- 244,253 ----
- this problem sorted out (or determined that there isn't a bug), the
- use of -E on the nnmaster is recommended.
-
- + - nn release 6.3 patch #4 introduced a new 'misinterpretation' of the
- + database. It is fixed in patch #5.
-
- +
- 8 BIT SUPPORT
- -------------
-
- ***************
- *** 238,245 ****
-
- The 'master flags' set on a group with nnadmin are forgotten if the
- database is reinitialized with nnmaster -I.
- -
- - The article selections saved between sessions are kept in a machine
- - dependent format, so if a user reads news on different architectures
- - the selection files may be misinterpreted if they cannot be ignored
- - (there is a magic number in them).
- --- 294,296 ----
- *** /usr/storm/nn6.3.0/Makefile Thu Jun 1 11:10:40 1989
- --- Makefile Fri Sep 8 12:46:40 1989
- ***************
- *** 29,34 ****
- --- 29,37 ----
- all: ymakefile
- $(MAKE) $(MFLAGS) -f ymakefile all
-
- + nn: ymakefile
- + $(MAKE) $(MFLAGS) -f ymakefile nn
- +
- lint: ymakefile
- $(MAKE) -f ymakefile lint
-
- *** /usr/storm/nn6.3.0/aux.sh Thu Jun 1 11:10:41 1989
- --- aux.sh Fri Sep 8 12:46:41 1989
- ***************
- *** 17,23 ****
- # $1 is ident, $2 is group name.
-
- if [ "$OPERATION" = "cancel" ] ; then
- ! $INEWS -t 'cmsg cancel '"$1" -n "$2" < /dev/null > /tmp/nn$$c 2>&1
- x=$?
- if [ $x != 0 ]; then
- echo ''
- --- 17,30 ----
- # $1 is ident, $2 is group name.
-
- if [ "$OPERATION" = "cancel" ] ; then
- ! $INEWS -h << EOF > /tmp/nn$$c 2>&1
- ! Newsgroups: $2
- ! Subject: cancel $1
- ! Control: cancel $1
- !
- ! cancel $1 in newsgroup $2
- ! EOF
- ! # $INEWS -t 'cmsg cancel '"$1" -n "$2" < /dev/null > /tmp/nn$$c 2>&1
- x=$?
- if [ $x != 0 ]; then
- echo ''
- ***************
- *** 48,54 ****
- while $loop ; do
- if $prompt ; then
- echo ''
- ! awk 'END{printf "Action: (a)bort (e)dit (o)k (s)end: "}' < /dev/null
- read act
- else
- act="${FIRST_ACTION}"
- --- 55,61 ----
- while $loop ; do
- if $prompt ; then
- echo ''
- ! awk 'END{printf "Action: (a)bort (e)dit (o)k (s)end (w)rite: "}' < /dev/null
- read act
- else
- act="${FIRST_ACTION}"
- ***************
- *** 88,93 ****
- --- 95,107 ----
- loop=false
- ;;
-
- + w*)
- + echo "Append article to file:"
- + read FNAME
- + if [ -n "$FNAME" ] ; then
- + { cat $WORK ; echo ; } >> $FNAME
- + fi
- + ;;
- esac
- done
-
- *** /usr/storm/nn6.3.4/collect.c Mon Jul 10 13:36:04 1989
- --- collect.c Fri Sep 8 12:46:41 1989
- ***************
- *** 2,7 ****
- --- 2,9 ----
- #include "db.h"
- #include "news.h"
-
- + #define COUNT_RE_REFERENCES /* no of >>> depends on Reference: line */
- +
- import int trace;
-
-
- ***************
- *** 151,158 ****
- else
- nextg = "";
-
- ! if (strcmp(gh->group_name, curg) == 0) break;
- !
- if ((gh1 = lookup(curg)) == NULL) continue;
-
- *cp_ptr++ = gh1->group_num;
- --- 153,161 ----
- else
- nextg = "";
-
- ! if (strcmp(gh->group_name, curg) == 0) /* break; */
- ! gh1 = gh;
- ! else
- if ((gh1 = lookup(curg)) == NULL) continue;
-
- *cp_ptr++ = gh1->group_num;
- ***************
- *** 254,259 ****
- --- 257,271 ----
- /* write subject line on .nn2 */
-
- hdr.dh_subject_length = pack_subject(subj_buf, subj, &re, 255);
- + #ifdef COUNT_RE_REFERENCES
- + if (re) re = 0x80;
- + if (news.ng_ref) {
- + for (name = news.ng_ref; *name; name++) {
- + if ((re & 0x7f) == 0x7f) break;
- + if (*name == '<') re++;
- + }
- + }
- + #endif
- hdr.dh_replies = re;
-
- if (use_digest & 2) hdr.dh_subject_length++; /* @ */
- *** /usr/storm/nn6.3.0/config.h-dist Thu Jun 1 11:10:41 1989
- --- config.h-dist Fri Sep 8 12:46:41 1989
- ***************
- *** 63,68 ****
- --- 63,79 ----
-
- #define NNTP_SERVER "/usr/lib/nntp_server"
-
- + /*
- + * Define NNTP_POST if you want nn to reject attempts to post via
- + * NNTP to a server, that disallows postings.
- + *
- + * You should define this, if you use the NNTP based inews for
- + * postings from NNTP clients. If you use another mechanism, that
- + * does not involve NNTP, you should leave it undefined.
- + */
- +
- + #define NNTP_POST /* */
- +
-
- /***************** OPERATING SYSTEM DEPENDENT DEFINITIONS *******************
- *
- *** /usr/storm/nn6.3.4/data.h Mon Jul 10 13:36:05 1989
- --- data.h Fri Sep 8 12:46:41 1989
- ***************
- *** 36,43 ****
- --- 36,48 ----
-
- int32 group_flag;
-
- + #ifdef I286_BUG
- + # define MF(n) (1L<<(n-1))
- + # define CF(n) (1L<<(n+15))
- + #else
- # define MF(n) (((int32)1)<<(n-1))
- # define CF(n) (((int32)1)<<(n+15))
- + #endif
-
- # define G_MASTER_FLAGS (MF(17)-1) /* flags that are saved on file */
-
- ***************
- *** 70,75 ****
- --- 75,81 ----
- /* AFTER THE PART WHICH IS SAVED IN THE MASTER FILE */
-
- group_number group_num;
- + group_number preseq_index;
-
- char * group_name;
-
- ***************
- *** 118,123 ****
- --- 124,132 ----
- int16 replies; /* no of Re: */
- int16 lines; /* no of lines */
-
- + int8 subj_length; /* length of subject */
- + int8 name_length; /* length of sender */
- +
- group_header *a_group; /* if merged article menu */
-
- int32 flag; /* flags: */
- *** /usr/storm/nn6.3.2/decode.c Wed Jun 28 19:09:17 1989
- --- decode.c Fri Sep 8 12:46:42 1989
- ***************
- *** 10,15 ****
- --- 10,17 ----
-
- #include "config.h"
-
- + export char *decode_header_file = "Decode.Headers";
- +
- #define MAXCHAR 256
- #define LINELEN 256
- #define NORMLEN 60 /* allows for 80 encoded chars per line */
- ***************
- *** 117,122 ****
- --- 119,127 ----
- goto err;
- }
- chmod(ofname, mode);
- +
- + if (decode_header_file)
- + store_header(ah, in, target, decode_header_file);
-
- msg("Decoding: %s", ofname);
- state = DECODE_TEXT;
- *** /usr/storm/nn6.3.0/digest.c Thu Jun 1 11:10:42 1989
- --- digest.c Fri Sep 8 12:46:42 1989
- ***************
- *** 115,120 ****
- --- 115,122 ----
- * expect that f is positioned at header of an article
- */
-
- + static int is_mmdf_folder = 0;
- +
- get_digest_article(f, hdrbuf)
- FILE *f;
- news_header_buffer hdrbuf;
- ***************
- *** 211,216 ****
- --- 213,224 ----
- if (fgets(line, 1024, f) == NULL) {
- TEST("end_of_file, bc=%d, lines=%d\n", backup_count, digest.dg_lines);
-
- + if (is_mmdf_folder) {
- + digest.dg_lpos = backup_p[backup_index];
- + is_mmdf_folder = 0;
- + return 0;
- + }
- +
- /* end of file => look for "****" or "End of" line */
-
- if (end_or_asterisks)
- ***************
- *** 235,240 ****
- --- 243,258 ----
- }
-
- TEST("\n>>%-.50s ==>>", line, 0);
- +
- + if (line[0] == '\001' && strcmp(line, "\001\001\001\001\n") == 0) {
- + digest.dg_lpos = backup_p[backup_index];
- + if (!is_mmdf_folder) fseek(f, digest.dg_lpos, 0);
- + --digest.dg_lines;
- + is_mmdf_folder = 0;
- + return (digest.dg_lines <= 0) ? -1 : 1;
- + }
- +
- + if (is_mmdf_folder) goto next_line;
-
- for (cp = line; *cp && isascii(*cp) && isspace(*cp); cp++);
-
- ***************
- *** 310,316 ****
-
- if (digest.dg_lines == 0) {
- TEST("Skipped empty article\n", 0, 0);
- ! return 0;
- }
-
- for (;;) {
- --- 328,334 ----
-
- if (digest.dg_lines == 0) {
- TEST("Skipped empty article\n", 0, 0);
- ! return -1;
- }
-
- for (;;) {
- ***************
- *** 362,367 ****
- --- 380,393 ----
-
- switch (*lp++) {
-
- + case '\001':
- + if (!is_mmdf_folder && strncmp(lp, "\001\001\001\n", 4) == 0) {
- + is_mmdf_folder = 1;
- + digest.dg_hpos += 5;
- + return NULL;
- + }
- + break;
- +
- case 'D':
- case 'd':
- check("ate: ", 5, dg_date);
- *** /usr/storm/nn6.3.4/execute.c Mon Jul 10 13:36:06 1989
- --- execute.c Fri Sep 8 12:46:42 1989
- ***************
- *** 15,21 ****
- char *path, **args;
- {
- int was_raw, pid, i, status;
- ! sig_type (*quit)(), (*intr)(), (*cont)();
- extern int errno;
-
- was_raw = unset_raw();
- --- 15,21 ----
- char *path, **args;
- {
- int was_raw, pid, i, status;
- ! sig_type (*quit)(), (*intr)(), (*tstp)();
- extern int errno;
-
- was_raw = unset_raw();
- ***************
- *** 34,40 ****
- quit = signal(SIGQUIT, SIG_IGN);
- intr = signal(SIGINT, SIG_IGN);
- #ifdef HAVE_JOBCONTROL
- ! cont = signal(SIGCONT, SIG_DFL);
- #endif
- while ((i = wait(&status)) != pid && (i != -1 || errno == EINTR));
-
- --- 34,40 ----
- quit = signal(SIGQUIT, SIG_IGN);
- intr = signal(SIGINT, SIG_IGN);
- #ifdef HAVE_JOBCONTROL
- ! tstp = signal(SIGTSTP, SIG_DFL);
- #endif
- while ((i = wait(&status)) != pid && (i != -1 || errno == EINTR));
-
- ***************
- *** 41,47 ****
- signal(SIGQUIT, quit);
- signal(SIGINT, intr);
- #ifdef HAVE_JOBCONTROL
- ! signal(SIGCONT, cont);
- #endif
-
- if (was_raw) raw();
- --- 41,47 ----
- signal(SIGQUIT, quit);
- signal(SIGINT, intr);
- #ifdef HAVE_JOBCONTROL
- ! signal(SIGTSTP, tstp);
- #endif
-
- if (was_raw) raw();
- ***************
- *** 88,94 ****
-
- run_shell(command, clear)
- char *command;
- ! int clear;
- {
- char cmdstring[512];
-
- --- 88,94 ----
-
- run_shell(command, clear)
- char *command;
- ! int clear; /* -1 => no output, 0 => CR/NL, 1 => clear */
- {
- char cmdstring[512];
-
- ***************
- *** 95,104 ****
- if (!expand_file_name(cmdstring, command))
- return 0;
-
- ! if (clear) {
- clrdisp();
- fl;
- ! } else {
- putchar(CR);
- putchar(NL);
- }
- --- 95,104 ----
- if (!expand_file_name(cmdstring, command))
- return 0;
-
- ! if (clear > 0) {
- clrdisp();
- fl;
- ! } else if (clear == 0) {
- putchar(CR);
- putchar(NL);
- }
- ***************
- *** 124,136 ****
- was_raw = unset_raw();
- gotoxy(0, Lines-1);
- clrline();
- !
- #ifdef HAVE_JOBCONTROL
- ! kill(process_id, SIGTSTP);
- #else
- execute(user_shell, exec_suspend_args);
- #endif
-
- s_redraw++;
- if (was_raw) raw();
-
- --- 124,138 ----
- was_raw = unset_raw();
- gotoxy(0, Lines-1);
- clrline();
- ! visual_off();
- !
- #ifdef HAVE_JOBCONTROL
- ! kill(process_id, SIGSTOP);
- #else
- execute(user_shell, exec_suspend_args);
- #endif
-
- + visual_on();
- s_redraw++;
- if (was_raw) raw();
-
- *** /usr/storm/nn6.3.4/global.c Mon Jul 10 13:36:09 1989
- --- global.c Fri Sep 8 12:46:42 1989
- ***************
- *** 15,20 ****
- --- 15,46 ----
-
- export int is_master;
-
- + #ifdef HAVE_MULTIGROUP
- + #ifndef NGROUPS
- + #include <sys/param.h>
- + #endif
- + #ifndef GIDSET_TYPE
- + #define GIDSET_TYPE int
- + #endif
- + static int ngroups;
- + static GIDSET_TYPE gidset[NGROUPS];
- +
- + static in_grplist(gid)
- + GIDSET_TYPE gid;
- + {
- + int n;
- +
- + for (n = 0; n < ngroups; ++n)
- + if (gidset[n] == gid) return 1;
- +
- + return 0;
- + }
- +
- + #define group_access(gpid) in_grplist((GIDSET_TYPE)(gpid))
- + #else
- + #define group_access(gid) ((gid) == group_id)
- + #endif
- +
- /* signal handler interface */
-
- export int s_hangup = 0; /* hangup signal */
- ***************
- *** 48,54 ****
- }
-
- #ifdef HAVE_JOBCONTROL
- ! static sig_type catch_redraw(n)
- {
- s_redraw++;
-
- --- 74,80 ----
- }
-
- #ifdef HAVE_JOBCONTROL
- ! static sig_type catch_suspend(n)
- {
- s_redraw++;
-
- ***************
- *** 55,60 ****
- --- 81,88 ----
- #ifdef RESET_SIGNAL_WHEN_CAUGHT
- signal(n, catch_redraw);
- #endif
- +
- + suspend_nn();
- }
- #endif
-
- ***************
- *** 72,77 ****
- --- 100,106 ----
- char *env;
- unsigned short getuid(), getgid();
- int getpid();
- + int suspend_nn();
-
- is_master = (who == 1);
-
- ***************
- *** 85,91 ****
- --- 114,127 ----
- #endif
-
- user_id = getuid();
- +
- + #ifdef HAVE_MULTIGROUP
- + ngroups = getgroups(NGROUPS, gidset); /* Get users's group set */
- + group_id = gidset[0]; /* not used, but just in case... */
- + #else
- group_id = getgid();
- + #endif
- +
- process_id = getpid();
-
- if (is_master) {
- ***************
- *** 97,103 ****
- signal(SIGINT, catch_keyboard);
- signal(SIGQUIT, catch_keyboard);
- #ifdef HAVE_JOBCONTROL
- ! signal(SIGCONT, catch_redraw);
- #endif
-
- if ((home_directory = getenv("HOME")) == NULL)
- --- 133,139 ----
- signal(SIGINT, catch_keyboard);
- signal(SIGQUIT, catch_keyboard);
- #ifdef HAVE_JOBCONTROL
- ! signal(SIGTSTP, catch_suspend);
- #endif
-
- if ((home_directory = getenv("HOME")) == NULL)
- ***************
- *** 317,333 ****
- break;
- case 'r':
- if ((statb.st_mode & 0400) && statb.st_uid == user_id) continue;
- ! if ((statb.st_mode & 0040) && statb.st_gid == group_id) continue;
- if ((statb.st_mode & 0004)) continue;
- break;
- case 'w':
- if ((statb.st_mode & 0200) && statb.st_uid == user_id) continue;
- ! if ((statb.st_mode & 0020) && statb.st_gid == group_id) continue;
- if ((statb.st_mode & 0002)) continue;
- break;
- case 'x':
- if ((statb.st_mode & 0100) && statb.st_uid == user_id) continue;
- ! if ((statb.st_mode & 0010) && statb.st_gid == group_id) continue;
- if ((statb.st_mode & 0001)) continue;
- break;
- }
- --- 353,369 ----
- break;
- case 'r':
- if ((statb.st_mode & 0400) && statb.st_uid == user_id) continue;
- ! if ((statb.st_mode & 0040) && group_access(statb.st_gid)) continue;
- if ((statb.st_mode & 0004)) continue;
- break;
- case 'w':
- if ((statb.st_mode & 0200) && statb.st_uid == user_id) continue;
- ! if ((statb.st_mode & 0020) && group_access(statb.st_gid)) continue;
- if ((statb.st_mode & 0002)) continue;
- break;
- case 'x':
- if ((statb.st_mode & 0100) && statb.st_uid == user_id) continue;
- ! if ((statb.st_mode & 0010) && group_access(statb.st_gid)) continue;
- if ((statb.st_mode & 0001)) continue;
- break;
- }
- ***************
- *** 397,402 ****
- --- 433,441 ----
- sys_error(va_alist)
- va_dcl
- {
- + char buf[512];
- + char *fmt;
- + FILE *f;
- va_list ap;
-
- va_start(ap);
- ***************
- *** 404,425 ****
- va_end(ap);
-
- if (is_master) {
- - #ifndef HAVE_SYSLOG
- - FILE *f;
- -
- - f = open_file("/dev/console", OPEN_CREATE);
- - if (f == NULL) nn_exit(8);
- - fprintf(f, "\n\rNNMASTER FATAL ERROR\n\r");
- - fclose(f);
- - #else /* HAVE_SYSLOG */
- - char buf[512];
- - char *fmt;
- -
- va_start(ap);
- fmt = va_arg1(char *);
- vsprintf(buf, fmt, va_args2toN);
- va_end(ap);
-
- openlog("nnmaster", LOG_CONS, LOG_DAEMON);
- syslog(LOG_ALERT, "%s", buf);
- closelog();
- --- 443,459 ----
- va_end(ap);
-
- if (is_master) {
- va_start(ap);
- fmt = va_arg1(char *);
- vsprintf(buf, fmt, va_args2toN);
- va_end(ap);
-
- + #ifndef HAVE_SYSLOG
- + f = open_file("/dev/console", OPEN_CREATE);
- + if (f == NULL) nn_exit(8);
- + fprintf(f, "\n\rNNMASTER FATAL ERROR\n\r%s\n\n\r", buf);
- + fclose(f);
- + #else /* HAVE_SYSLOG */
- openlog("nnmaster", LOG_CONS, LOG_DAEMON);
- syslog(LOG_ALERT, "%s", buf);
- closelog();
- *** /usr/storm/nn6.3.0/global.h Thu Jun 1 11:10:43 1989
- --- global.h Fri Sep 8 12:46:43 1989
- ***************
- *** 26,35 ****
-
- #define fl fflush(stdout)
-
- ! #ifdef CTRL
- ! #undef CTRL
- #endif
- ! #define CTRL(c) (c&037)
-
- #ifndef HAVE_STRCHR
- #define strrchr rindex
- --- 26,35 ----
-
- #define fl fflush(stdout)
-
- ! #ifdef CONTROL_
- ! #undef CONTROL_
- #endif
- ! #define CONTROL_(c) (c&037)
-
- #ifndef HAVE_STRCHR
- #define strrchr rindex
- ***************
- *** 40,45 ****
- --- 40,49 ----
- typedef void sig_type;
- #else
- typedef int sig_type;
- + #endif
- +
- + #ifndef NNTP
- + #undef NNTP_POST
- #endif
-
- /*
- *** /usr/storm/nn6.3.4/group.c Mon Jul 10 13:36:10 1989
- --- group.c Fri Sep 8 12:46:43 1989
- ***************
- *** 16,21 ****
- --- 16,22 ----
- export int dont_split_digests = 0;
- export int dont_sort_articles = 0;
- export int also_cross_postings = 0;
- + export int seq_cross_filtering = 0;
-
- import int article_limit, also_read_articles;
- import int no_update;
- ***************
- *** 111,116 ****
- --- 112,118 ----
- #define DONT_SORT_ARTICLES 0x02
- #define DONT_SPLIT_DIGESTS 0x04 /* only full digest */
- #define ALSO_FULL_DIGEST 0x08 /* also full digest */
- + #define EXTRA_ARTICLES 0x10 /* add to current menu */
-
- static access_group(gh, first_article, last_article, flags, submask, do_kill)
- register group_header *gh;
- ***************
- *** 119,124 ****
- --- 121,127 ----
- char *submask;
- int do_kill;
- {
- + group_header *cpgh;
- FILE *data;
- data_header hdr;
- off_t data_offset;
- ***************
- *** 132,139 ****
- static regexp *subpattern = NULL;
- static char subptext[80];
-
- - if (init_group(gh) <= 0) return -2;
- -
- if (first_article < gh->first_l_article)
- first_article = gh->first_l_article;
-
- --- 135,140 ----
- ***************
- *** 168,174 ****
- subpattern = NULL;
- }
-
- ! mark_memory(&mem_marker);
-
- ah = alloc_art();
-
- --- 169,176 ----
- subpattern = NULL;
- }
-
- ! if ((flags & EXTRA_ARTICLES) == 0)
- ! mark_memory(&mem_marker);
-
- ah = alloc_art();
-
- ***************
- *** 211,218 ****
- cross_post = ntohl(cross_post);
- #endif
- #endif
- ! if (active_groups[cross_post].group_flag & G_SUBSCRIPTION)
- break;
- } while (--n > 0);
- if (n > 0) {
- if (IS_DIGEST_HEADER(hdr)) skip_digest++;
- --- 213,231 ----
- cross_post = ntohl(cross_post);
- #endif
- #endif
- ! cpgh = &active_groups[cross_post];
- ! if (cpgh == gh) {
- ! if (seq_cross_filtering) continue;
- ! if (n > 1)
- ! fseek(data, (off_t)(sizeof(cross_post_number)*(n-1)), 1);
- ! n = 0;
- break;
- + }
- + if (cpgh->group_flag & G_SUBSCRIPTION) {
- + if (!seq_cross_filtering) break;
- + if (cpgh->preseq_index > 0 &&
- + cpgh->preseq_index < gh->preseq_index) break;
- + }
- } while (--n > 0);
- if (n > 0) {
- if (IS_DIGEST_HEADER(hdr)) skip_digest++;
- ***************
- *** 238,244 ****
-
- mark_str(&str_marker);
-
- ! if (hdr.dh_sender_length) {
- ah->sender = alloc_str((int)hdr.dh_sender_length);
- if (fread(ah->sender, sizeof(char), (int)hdr.dh_sender_length, data)
- != hdr.dh_sender_length) goto data_error;
- --- 251,257 ----
-
- mark_str(&str_marker);
-
- ! if (ah->name_length = hdr.dh_sender_length) {
- ah->sender = alloc_str((int)hdr.dh_sender_length);
- if (fread(ah->sender, sizeof(char), (int)hdr.dh_sender_length, data)
- != hdr.dh_sender_length) goto data_error;
- ***************
- *** 245,251 ****
- } else
- ah->sender = "";
-
- ! if (hdr.dh_subject_length) {
- ah->subject = alloc_str((int)hdr.dh_subject_length);
- if (fread(ah->subject, sizeof(char), (int)hdr.dh_subject_length, data)
- != hdr.dh_subject_length) goto data_error;
- --- 258,264 ----
- } else
- ah->sender = "";
-
- ! if (ah->subj_length = hdr.dh_subject_length) {
- ah->subject = alloc_str((int)hdr.dh_subject_length);
- if (fread(ah->subject, sizeof(char), (int)hdr.dh_subject_length, data)
- != hdr.dh_subject_length) goto data_error;
- ***************
- *** 280,286 ****
- data_error:
- log_entry('E', "%s: data inconsistency", gh->group_name);
- fclose(data);
- ! release_memory(&mem_marker);
- return -1;
-
- out:
- --- 293,300 ----
- data_error:
- log_entry('E', "%s: data inconsistency", gh->group_name);
- fclose(data);
- ! if ((flags & EXTRA_ARTICLES) == 0)
- ! release_memory(&mem_marker);
- return -1;
-
- out:
- ***************
- *** 357,362 ****
- --- 371,379 ----
- o_first_article = current_first_article;
- o_killed = killed_articles;
- mark_memory(&sel_marker);
- +
- + if (init_group(gh) <= 0) menu_return( ME_NEXT );
- + m_invoke(-1);
-
- after_selection:
-
- ***************
- *** 363,368 ****
- --- 380,390 ----
- did_selection = 0;
- killed_articles = 0;
-
- + /* don't lose (a few) new articles when reentering a read group */
- + /* (the user will expect the menu to be the same, and may overlook */
- + /* the new articles) */
- + if (gh->group_flag & G_READ) goto update_unsafe;
- +
- prev_last = gh->last_l_article;
-
- was_unread = add_unread(gh, -1);
- ***************
- *** 389,394 ****
- --- 411,417 ----
- if (was_unread)
- add_unread(gh, 1);
-
- + update_unsafe:
- gotoxy(0, 0);
- fl;
-
- ***************
- *** 404,410 ****
- if (submask == NULL && !also_read_articles) {
- if (has_selection(gh, ¤t_first_article, &last_article)) {
- status = access_group(gh, current_first_article, last_article,
- ! DONT_SORT_ARTICLES, (char *)NULL, 0);
- do_selections(status >= 0 && n_articles);
- if (status < 0) goto access_exception;
- if (n_articles) {
- --- 427,433 ----
- if (submask == NULL && !also_read_articles) {
- if (has_selection(gh, ¤t_first_article, &last_article)) {
- status = access_group(gh, current_first_article, last_article,
- ! access_mode | DONT_SORT_ARTICLES, (char *)NULL, 0);
- do_selections(status >= 0 && n_articles);
- if (status < 0) goto access_exception;
- if (n_articles) {
- ***************
- *** 449,457 ****
- menu_return( ME_NEXT );
- }
-
- ! if (n_articles == 0)
- menu_return( ME_NO_ARTICLES );
- !
- read_the_articles:
-
- menu_cmd = (*menu)(print_header);
- --- 472,482 ----
- menu_return( ME_NEXT );
- }
-
- ! if (n_articles == 0) {
- ! m_break_entry();
- menu_return( ME_NO_ARTICLES );
- ! }
- !
- read_the_articles:
-
- menu_cmd = (*menu)(print_header);
- ***************
- *** 683,691 ****
-
- m_advinput();
-
- ! if (gh->last_l_article == 0 ||
- gh->last_l_article < gh->first_l_article) {
- ! msg("Group %s is empty", answer);
- goto_return(ME_NO_REDRAW);
- }
-
- --- 708,718 ----
-
- m_advinput();
-
- ! if (gh->group_flag & G_BLOCKED ||
- ! gh->last_l_article == 0 ||
- gh->last_l_article < gh->first_l_article) {
- ! msg("Group %s is %s", answer,
- ! (gh->group_flag & G_BLOCKED) ? "blocked" : "empty");
- goto_return(ME_NO_REDRAW);
- }
-
- ***************
- *** 800,806 ****
- }
-
- if (access_group(gh, first, current_first_article - 1,
- ! ALSO_CROSS_POSTINGS, (char *)NULL, 0) < 0) {
- msg("Cannot read extra articles (now)");
- goto_return(ME_NO_REDRAW);
- }
- --- 827,833 ----
- }
-
- if (access_group(gh, first, current_first_article - 1,
- ! EXTRA_ARTICLES|ALSO_CROSS_POSTINGS, (char *)NULL, 0) < 0) {
- msg("Cannot read extra articles (now)");
- goto_return(ME_NO_REDRAW);
- }
- ***************
- *** 817,823 ****
-
- if (gh != orig_group) {
- current_first_article = o_current_first;
- ! if (orig_group) init_group(orig_group);
- }
-
- goto_exit:
- --- 844,850 ----
-
- if (gh != orig_group) {
- current_first_article = o_current_first;
- ! if (orig_group) { init_group(orig_group); m_invoke(-1); }
- }
-
- goto_exit:
- ***************
- *** 849,855 ****
- if (dont_split_digests)
- access_mode |= DONT_SPLIT_DIGESTS;
-
- ! for (cur = group_sequence; cur != NULL; cur = cur->next_group) {
- if (s_hangup || s_keyboard) break;
-
- if (cur->group_flag & G_FOLDER) {
- --- 876,882 ----
- if (dont_split_digests)
- access_mode |= DONT_SPLIT_DIGESTS;
-
- ! Loop_Groups_Sequence(cur) {
- if (s_hangup || s_keyboard) break;
-
- if (cur->group_flag & G_FOLDER) {
- ***************
- *** 863,868 ****
- --- 890,896 ----
-
- printf("\r%s", cur->group_name); clrline();
-
- + if (init_group(cur) <= 0) continue;
- access_group(cur, (article_number)(-1), cur->last_l_article, access_mode, submask, do_kill);
- }
- merge_memory();
- ***************
- *** 926,931 ****
- --- 954,970 ----
-
- pg_init(0, 2);
-
- + if (amount < 0) {
- + Loop_Groups_Sequence(gh) {
- + if (gh->group_flag & (G_READ | G_NO_DIRECTORY))
- + continue;
- + if ((gh->group_flag & G_SUBSCRIPTION) == 0)
- + continue;
- + if (gh->last_article >= gh->last_l_article)
- + continue;
- + if (disp_group(gh) < 0) break;
- + }
- + } else
- Loop_Groups_Sorted(gh) {
-
- if (gh->group_flag & G_NO_DIRECTORY) continue;
- ***************
- *** 939,951 ****
- if (amount == 3 && (gh->group_flag & G_SUBSCRIPTION))
- continue;
-
- ! if (pg_next() < 0) break;
- !
- ! printf("%6ld %s%s",
- ! (long)(gh->last_l_article - gh->last_article),
- ! gh->group_name,
- ! gh->group_flag & G_SUBSCRIPTION ? "" : " (!)");
- }
-
- pg_end();
- }
- --- 978,1000 ----
- if (amount == 3 && (gh->group_flag & G_SUBSCRIPTION))
- continue;
-
- ! if (disp_group(gh) < 0) break;
- }
-
- pg_end();
- }
- +
- + static disp_group(gh)
- + group_header *gh;
- + {
- + if (pg_next() < 0) return -1;
- +
- + printf("%6ld%c%s%s",
- + (long)(gh->last_l_article - gh->last_article),
- + (gh == current_group) ? '*' : ' ',
- + gh->group_name,
- + gh->group_flag & G_SUBSCRIPTION ? "" : " (!)");
- +
- + return 0;
- + }
- +
- *** /usr/storm/nn6.3.0/help.commands Thu Jun 1 11:10:43 1989
- --- help.commands Fri Sep 8 12:46:43 1989
- ***************
- *** 1,12 ****
- --- 1,16 ----
- ;:ACOMMAND NAMES;:A ;:AMAP COMMAND;:A
-
- ;:BNAME MENU MORE FUNCTION
- + advance-article A advance to next article from menu
- advance-group A advance one group in sequence
- + article N a-z select article N (0..no of menu lines-1)
- + back-article B go back one article from menu
- back-group B go back one group in sequence
- cancel C C cancel an article
- command : : extenced command prefix
- compress c compress text (eliminate extra spaces)
- continue SPACE SPACE the "space bar" command
- + decode :decode :decode decode uuencoded article(s)
- find / regular expression search
- find-next . repeat regular expression search
- follow F f F follow up
- ***************
- *** 16,24 ****
- --- 20,30 ----
- help ? ? online help
- kill-select K K kill/select handling
- layout L change menu layout
- + leave-article l l leave (mark) article for later use
- line+1 down CR next menu line/scroll one line
- line-1 up previous menu line
- line=@ g goto specific line
- + macro N invoke macro number N (0..100)
- mail M m M mail or forward
- message ^P ^P repeat last prompt line message
- next-article n skip to next article
- ***************
- *** 34,43 ****
- page=0 h goto header of article
- page=1 ^ ^ goto first menu/article page
- page=@ goto specific page of article (not implemented)
- ! post post new article
- preview % preview article
- ! previous P P goto previous group/article
- ! print p print article
- quit Q Q quit nn
- read-return Z read selected articles and return to menu
- read-skip X read selected article, skip unseen menu pages
- --- 40,50 ----
- page=0 h goto header of article
- page=1 ^ ^ goto first menu/article page
- page=@ goto specific page of article (not implemented)
- ! patch :patch :patch pipe article through patch program
- ! post :post :post post new article
- preview % preview article
- ! previous P p goto previous group/article
- ! print :print P print article
- quit Q Q quit nn
- read-return Z read selected articles and return to menu
- read-skip X read selected article, skip unseen menu pages
- *** /usr/storm/nn6.3.0/help.extended Thu Jun 1 11:10:43 1989
- --- help.extended Fri Sep 8 12:46:43 1989
- ***************
- *** 2,19 ****
-
- :help COMMAND give help on specific command
-
- ! :q! quit nn without update (only with -B option)
- :x quit nn, mark current group as read
-
- ! :mkdir [DIR] create directory DIR (will prompt for DIR if omitted)
- ! :cd [DIR] change working directory to DIR
-
- :admin enter administration mode
- !
- ! :set OPTION [VALUE] set or unset option (use 'help set' for more info)
- ! :map MODE KEY COMMAND remap key or command
- ! :show TABLE show contents of various tables
- :sort MODE sort menu according to subject, age, or arrival
- !
- :unread (N) mark current group as unread (last N articles)
- ! :coredump abort with a core dump
- --- 2,28 ----
-
- :help COMMAND give help on specific command
-
- ! :q! quit nn without update
- :x quit nn, mark current group as read
-
- ! :! SHELL-COMMAND execute SHELL-COMMAND w/o screen redraw.
-
- :admin enter administration mode
- ! :cd [DIR] change working directory to DIR
- ! :compile recompile & load kill file
- ! :coredump abort with a core dump
- ! :decode decode uuencoded article(s)
- ! :define N ... end define macro N
- ! :man read online manual
- ! :map MODE KEY COMMAND remap key or command (use ':help map' for more info)
- ! :mkdir [DIR] create directory DIR (will prompt for DIR if omitted)
- ! :print print article
- ! :set VARIABLE [VALUE] set or unset variable (use ':help set' for more info)
- ! :show groups HOW show group subscriptions etc.
- ! :show kill show kill file entries for current group
- ! :show map MAP show key mappings (MAP = #, key, menu, show)
- :sort MODE sort menu according to subject, age, or arrival
- ! :toggle VARIABLE toggle boolean variable
- :unread (N) mark current group as unread (last N articles)
- ! :unset VARIABLE clear variable
- ! :unshar unshar article(s)
- *** /usr/storm/nn6.3.0/help.help Thu Jun 1 11:10:43 1989
- --- help.help Fri Sep 8 12:46:43 1989
- ***************
- *** 1,8 ****
- ;:AHELP COMMAND;:A
-
- ! Synopsis
-
- ! :help subject
-
- Help is available on the the following subjects:
-
- --- 1,8 ----
- ;:AHELP COMMAND;:A
-
- ! :man Read online manual
-
- ! :help SUBJECT Get help on specified SUBJECT
-
- Help is available on the the following subjects:
-
- *** /usr/storm/nn6.3.0/help.map Thu Jun 1 11:10:43 1989
- --- help.map Fri Sep 8 12:46:44 1989
- ***************
- *** 4,18 ****
-
- map menu KEY COMMAND map KEY into COMMAND in menu mode
- map show KEY COMMAND map KEY into COMMAND in article presentation mode
- map key KEY1 KEY2 map KEY1 into KEY2 (unconditionally)
- map #N CH1 CH2 ... define the input sequence CH1 CH2 ... as special key N
-
- ;:AKEYS;:A
-
- ! 0xNN: the ascii character NN
- ! C: the character C
- ! ^C: control-C (^? = DEL)
- ! #N: special key number N
- ! up, down, left, rigth: the arrow keys
-
- ;:Chelp.commands
- --- 4,27 ----
-
- map menu KEY COMMAND map KEY into COMMAND in menu mode
- map show KEY COMMAND map KEY into COMMAND in article presentation mode
- + map both KEY COMMAND map KEY into COMMAND in both modes
- map key KEY1 KEY2 map KEY1 into KEY2 (unconditionally)
- map #N CH1 CH2 ... define the input sequence CH1 CH2 ... as special key N
-
- + ;:ASPECIAL FORMS;:A (TABLE = menu, show, both)
- +
- + map TABLE KEY1 as KEY2 map KEY1 into the command bound to KEY2
- + map TABLE KEY macro N map KEY to invoke macro number N
- + map menu KEY article N map KEY to select item number N (base 0) on the menu
- +
- ;:AKEYS;:A
-
- ! 0xNN the ascii character NN
- ! C the character C
- ! ^C control-C
- ! ^? DEL
- ! #N special key number N
- !
- ! up, down, left, rigth: the arrow keys
-
- ;:Chelp.commands
- *** /usr/storm/nn6.3.0/help.menu Thu Jun 1 11:10:43 1989
- --- help.menu Fri Sep 8 12:46:44 1989
- ***************
- *** 1,22 ****
- ;:ASELECT (toggle);:A ;:AMOVE;:A
- ! a-z0-9 specified article , Next menu line
- ! x-y range x to y / Previous menu line
- ! x* same subject as x SPACE Next menu page (if any)
- ! . current article < > Prev/Next menu page
- ! @ Reverse all selections ^ $ First/Last menu page
- !
- ;:ASHOW SELECTED ARTICLES;:A
- SPACE Show selected articles (only when on last menu page)
- Z Show selected articles NOW, and return to this group afterwards
- X Show selected articles NOW, and continue with next group
- -
- ;:AGOTO OTHER GROUPS;:A
- X If no articles are selected then skip to next group.
- N P Goto next/previous group WITHOUT reading current group
- G Goto named group or open a folder.
- B A Go back/forward in groups already read
- -
- ;:AMISCELLANEOUS;:A
- ! U (Un)subscribe L Change menu layout
- S O W Save articles ! Shell escape
- ! F R M Follow-up/Reply/Mail C Cancel an article of your own
- --- 1,22 ----
- ;:ASELECT (toggle);:A ;:AMOVE;:A
- ! a-z0-9 Specified article , Next menu line
- ! x-y Range x to y / Previous menu line
- ! x* Same subject as x SPACE Next menu page (if any)
- ! . Current article < > Prev/Next menu page
- ! @ ~ Reverse/Undo all selections ^ $ First/Last menu page
- ! =regexp Matching subjects
- ;:ASHOW SELECTED ARTICLES;:A
- SPACE Show selected articles (only when on last menu page)
- Z Show selected articles NOW, and return to this group afterwards
- X Show selected articles NOW, and continue with next group
- ;:AGOTO OTHER GROUPS;:A
- X If no articles are selected then skip to next group.
- N P Goto next/previous group WITHOUT reading current group
- G Goto named group or open a folder.
- B A Go back/forward in groups already read
- ;:AMISCELLANEOUS;:A
- ! Q Quit nn :help More online help
- ! U C (Un)subscribe / Cancel :man Online manual
- ! F R M Follow-up/Reply/Mail L Change menu layout
- S O W Save articles ! Shell escape
- ! :unshar :decode :patch Unpack articles
- *** /usr/storm/nn6.3.4/help.more Mon Jul 10 13:36:11 1989
- --- help.more Fri Sep 8 12:46:44 1989
- ***************
- *** 14,20 ****
- ;:AQUIT / ESCAPE;:A
- ;:ASAVE;:A = back to menu
- s, o, w save with full/short/no header N goto next group
- ! :unshar unshar article X as N, mark as read
- !, ^Z Shell escape, suspend
- ;:AREPLY, POST;:A Q quit nn
- r mail reply to author of article
- --- 14,20 ----
- ;:AQUIT / ESCAPE;:A
- ;:ASAVE;:A = back to menu
- s, o, w save with full/short/no header N goto next group
- ! :unshar :decode :patch unpack article X as N, mark as read
- !, ^Z Shell escape, suspend
- ;:AREPLY, POST;:A Q quit nn
- r mail reply to author of article
- *** /usr/storm/nn6.3.0/help.variables Thu Jun 1 11:10:44 1989
- --- help.variables Fri Sep 8 12:46:44 1989
- ***************
- *** 1,34 ****
- ;:AVARIABLES;:A
-
- ! backup Keep backup of rc file + delay update until quit (= -B)
- comp1-key KEY Completion key 1 (space)
- comp2-key KEY Completion key 2 (tab)
- ! confirm User must confirm all messages with return (= -W)
- ! date Show article dates (date = -D)
- ! default-save-file FILE Default save file (for + abbreviation)
- delay-redraw Do not redraw screen immediately after : commands
- erase-key KEY Erase last input character or completion
- expert Use shorter prompts
- folder DIR Folder directory
- fsort Sort folders in subject order (nofsort = -f)
- header-lines LIST Customized article header format
- help-key KEY Completion help key (?)
- included-mark STR Prefix on included lines in replies (>)
- kill Enable/disable auto kill/select (nokill = -k)
- kill-key KEY Delete input line key
- layout N Menu layout N (-LN)
- limit N Limit number of presented articles to N (-aN)
- long-menu Use all lines on the menu screen
- macro-debug Trace the execution of all macros
- mail-format Folders are created in mail compatible format
- mail-record FILE Save all replies in FILE
- monitor Print all characters when reading article
- news-record FILE Save all posted articles in FILE
- old N Show read articles also (-xN, or -x if N is omitted)
- overlap N Display last N lines on next page when reading
- pager CMD Screen pager used in administration mode (e.g. pg -n)
- printer CMD Default print command (e.g. lp -s)
- quick-save Save in default save file without asking
- record FILE Set both news-record and mail-record to FILE
- repeat Do not truncate repeated subject lines
- retry-on-error N Retry N times if open of article fails
- --- 1,57 ----
- ;:AVARIABLES;:A
-
- ! Certain variables can be toggled with the specified command line options.
- !
- ! also-subgroups Group names in sequence includes subgroups as well
- ! backup Keep backup of rc file (-B)
- ! collapse-subject Offset at which long subjects are compressed
- ! columns Screen width
- comp1-key KEY Completion key 1 (space)
- comp2-key KEY Completion key 2 (tab)
- ! confirm-append User must confirm saving in existing files
- ! confirm-auto-quit User must confirm quit after reading last group
- ! confirm-messages User must confirm all messages with return (-W)
- ! cross-filter-seq Show cross posted articles in first group in sequence
- ! cross-post Show cross posted articles in all groups (-X)
- ! date Show article dates (-D)
- ! decode-header-file Save file for headers of :decoded articles
- ! default-distribution DISTR Default answer when asking for distribution
- ! default-save-file FILE Default save file (for + abbreviation)
- delay-redraw Do not redraw screen immediately after : commands
- erase-key KEY Erase last input character or completion
- expert Use shorter prompts
- + flow-control Toggle between raw and cooked to enable flow control
- folder DIR Folder directory
- fsort Sort folders in subject order (nofsort = -f)
- header-lines LIST Customized article header format
- help-key KEY Completion help key (?)
- + include-art-id Include article-id in ".... writes:" line in follow-ups
- included-mark STR Prefix on included lines in replies (>)
- kill Enable/disable auto kill/select (nokill = -k)
- kill-key KEY Delete input line key
- layout N Menu layout N (-LN)
- limit N Limit number of presented articles to N (-aN)
- + lines Screen length
- long-menu Use all lines on the menu screen
- macro-debug Trace the execution of all macros
- + mail Mailbox file to check for arrival of new mail
- mail-format Folders are created in mail compatible format
- + mail-header STRING Extra header lines to include in posted mail
- mail-record FILE Save all replies in FILE
- + mark-overlap Underline last line from prev page to show overlap
- + min-window Minimum size of preview window, clear if smaller
- + mmdf-format Folders are written in MMDF format
- monitor Print all characters when reading article
- + news-header STRING Extra header lines to include in posted articles
- news-record FILE Save all posted articles in FILE
- + newsrc Maintain .newsrc file (not full compatibility)
- old N Show read articles also (-xN, or -x if N is omitted)
- overlap N Display last N lines on next page when reading
- pager CMD Screen pager used in administration mode (e.g. pg -n)
- + patch-cmd Command used by :patch command
- printer CMD Default print command (e.g. lp -s)
- quick-save Save in default save file without asking
- + re-layout N Presentation of Re: prefixes on menu subjects
- record FILE Set both news-record and mail-record to FILE
- repeat Do not truncate repeated subject lines
- retry-on-error N Retry N times if open of article fails
- ***************
- *** 35,43 ****
- save-counter FMT Format of the save counter (e.g. .%02d)
- save-report Display number of lines saved
- silent Do not print "No news" etc.
- ! sort Sort articles on menu (nosort = -q)
- ! split Split digests (nosplit = -d)
- ! stop N Stop printing of articles after N lines (= -lN)
- ! time Show current time on prompt line (notime = -T)
- ! window N Preview window size is N lines (= -wN)
- !
- --- 58,71 ----
- save-counter FMT Format of the save counter (e.g. .%02d)
- save-report Display number of lines saved
- silent Do not print "No news" etc.
- ! slow-mode Minimize screen output
- ! slow-speed SPEED 'on slow' clause is true for this and lower speeds
- ! sort Sort articles on menu (-q)
- ! split Split digests (-d)
- ! stop N Stop printing of articles after N lines (-lN)
- ! time Show current time on prompt line (-T)
- ! unshar-header-file Save file for headers from unshared articles
- ! visible-bell Use visible bell if defined in termcap/terminfo
- ! window N Preview window size is N lines (-wN)
- ! word-key KEY Delete last component (word) of input (^W)
- ! wrap-header-margin Fold long header lines over multiple lines
- *** /usr/storm/nn6.3.0/help.welcome Thu Jun 1 11:10:44 1989
- --- help.welcome Fri Sep 8 12:46:44 1989
- ***************
- *** 2,16 ****
-
- Unlike the other news readers you might be familiar with, the ultimate
- goal of nn is "not to read news"; actually, "nn" is an acronym for "No
- ! News", and the parole for nn is:
-
- No news is good news, but nn is better.
-
- I hope that you will enjoy using nn.
-
- ! If you have problems, try the '?' command which will provide a quick
- ! reference guide for the present environment. Otherwise, consult the
- ! manuals or ask a local guru.
-
-
- Have fun,
- --- 2,16 ----
-
- Unlike the other news readers you might be familiar with, the ultimate
- goal of nn is "not to read news"; actually, "nn" is an acronym for "No
- ! News", and the motto of nn is:
-
- No news is good news, but nn is better.
-
- I hope that you will enjoy using nn.
-
- ! Three levels of online help is available: ;:A?;:A gives a quick reference
- ! guide for the current mode, ;:A:help;:A explains how to get help on specific
- ! subjects, and ;:A:man;:A lets you read the online manual.
-
-
- Have fun,
- *** /usr/storm/nn6.3.4/init.c Mon Jul 10 13:36:12 1989
- --- init.c Fri Sep 8 12:46:44 1989
- ***************
- *** 38,49 ****
- }
-
-
- ! visit_init_file()
- {
- extern FILE *loc_seq_hook, *glob_seq_hook;
- in_init = 1;
- ! load_init_file(relative(lib_directory, "init"), &glob_seq_hook);
- ! load_init_file("init", &loc_seq_hook);
- if (init_err) nn_exit(1);
- in_init = 0;
- }
- --- 38,50 ----
- }
-
-
- ! visit_init_file(only_seq)
- ! int only_seq;
- {
- extern FILE *loc_seq_hook, *glob_seq_hook;
- in_init = 1;
- ! load_init_file(relative(lib_directory, "init"), &glob_seq_hook, only_seq);
- ! load_init_file("init", &loc_seq_hook, only_seq);
- if (init_err) nn_exit(1);
- in_init = 0;
- }
- ***************
- *** 52,58 ****
- #define START_SEQUENCE 555
-
-
- ! static load_init_file(name, seq_hook_ptr)
- char *name;
- FILE **seq_hook_ptr;
- {
- --- 53,59 ----
- #define START_SEQUENCE 555
-
-
- ! static load_init_file(name, seq_hook_ptr, only_seq)
- char *name;
- FILE **seq_hook_ptr;
- {
- ***************
- *** 77,82 ****
- --- 78,88 ----
- if (init == NULL) return;
-
- while (fgets(cmdbuf, 512, init)) {
- + if (only_seq) {
- + if (!is_sequence(cmdbuf)) continue;
- + *seq_hook_ptr = init;
- + return;
- + }
- /* we use AC_REDRAW to avoid !-commands clear the screen */
- if (parse_command(cmdbuf, AC_REDRAW, init) == START_SEQUENCE) {
- if (seq_hook_ptr) {
- ***************
- *** 117,123 ****
- --- 123,134 ----
- /* split command string */
-
- for (argc = 0; argc < MAXARG + 2; argc++) argvec[argc] = NULL;
- + strip_more:
- if ((cmd = strip_str(cmd)) == NULL || *cmd == '#') return 0;
- + if (*cmd == ':') {
- + cmd++;
- + goto strip_more;
- + }
-
- argc = 0;
- argvec[0] = cmd;
- ***************
- *** 163,168 ****
- --- 174,187 ----
- return argvec[i];
- }
-
- + static is_sequence(cmd)
- + char *cmd;
- + {
- + if (!split_command(cmd)) return 0;
- + if ((cmd = argv(0)) == NULL) return 0;
- + return strcmp(cmd, "sequence") == 0;
- + }
- +
-
- /*
- * parse a command (also :-commands)
- ***************
- *** 383,392 ****
- int ok_val;
- FILE *initf;
- {
- if (!split_command(cmd)) return ok_val;
-
- if (*ARGTAIL == '!') {
- ! if (run_shell(ARGTAIL+1, ok_val == AC_PROMPT)) {
- any_key(0);
- return AC_REDRAW;
- }
- --- 402,415 ----
- int ok_val;
- FILE *initf;
- {
- + extern char *m_define(), *parse_enter_macro();
- +
- if (!split_command(cmd)) return ok_val;
-
- if (*ARGTAIL == '!') {
- ! if (run_shell(ARGTAIL+1,
- ! ok_val == AC_PROMPT ? 1 :
- ! ok_val == AC_UNCHANGED ? -1 : 0) && ok_val != AC_UNCHANGED) {
- any_key(0);
- return AC_REDRAW;
- }
- ***************
- *** 458,467 ****
- if (in_init) {
-
- CASE( "load" ) {
- ! if (argv(1)) load_init_file(argv(1), (FILE **)NULL);
- break;
- }
-
- CASE( "sequence" ) {
- return START_SEQUENCE;
- }
- --- 481,499 ----
- if (in_init) {
-
- CASE( "load" ) {
- ! if (argv(1)) load_init_file(argv(1), (FILE **)NULL, 0);
- break;
- }
-
- + CASE( "on" ) {
- + parse_on_to_end(initf);
- + break;
- + }
- +
- + CASE( "end" ) {
- + break;
- + }
- +
- CASE( "sequence" ) {
- return START_SEQUENCE;
- }
- ***************
- *** 810,816 ****
- if (argv(3))
- code = lookup_command(argv(3), K_ONLY_MENU);
-
- ! if (code == K_MACRO)
- if (argv(4))
- code |= atoi(argv(4));
- else
- --- 842,854 ----
- if (argv(3))
- code = lookup_command(argv(3), K_ONLY_MENU);
-
- ! if (code == K_EQUAL_KEY) {
- ! if (argv(4))
- ! code = menu_key_map[parse_key(argv(4))];
- ! else
- ! goto mac_err;
- ! } else
- ! if (code == K_MACRO || code == K_ARTICLE_ID)
- if (argv(4))
- code |= atoi(argv(4));
- else
- ***************
- *** 826,831 ****
- --- 864,875 ----
- if (argv(3))
- code = lookup_command(argv(3), K_ONLY_MORE);
-
- + if (code == K_EQUAL_KEY) {
- + if (argv(4))
- + code = menu_key_map[parse_key(argv(4))];
- + else
- + goto mac_err;
- + } else
- if (code == K_MACRO)
- if (argv(4))
- code |= atoi(argv(4));
- ***************
- *** 850,860 ****
- return;
-
- mac_err:
- ! print_command("macro number missing");
- return;
- }
-
- !
-
- display_help(subject)
- char *subject;
- --- 894,955 ----
- return;
-
- mac_err:
- ! print_command("last argument missing");
- return;
- }
-
- ! static parse_on_to_end(f)
- ! FILE *f;
- ! {
- ! register char *cp;
- ! char buf[256];
- !
- ! if (argv(1) == NULL) goto on_err;
- !
- ! SWITCH ( argv(1) ) {
- !
- ! CASE( "entry" ) {
- ! import char *dflt_enter_macro;
- !
- ! dflt_enter_macro = parse_enter_macro(f, NL);
- ! break;
- ! }
- !
- ! /* CASE( "exit" ) {
- ! import char *dflt_exit_macro;
- !
- ! dflt_exit_macro = parse_enter_macro(f, NL);
- ! break;
- ! }
- ! */
- ! CASE( "slow" ) {
- ! import int terminal_speed, slow_speed;
- !
- ! if (terminal_speed > (slow_speed / 10)) goto skip_to_end;
- ! break;
- ! }
- !
- ! CASE( "fast" ) {
- ! import int terminal_speed, slow_speed;
- !
- ! if (terminal_speed <= (slow_speed / 10)) goto skip_to_end;
- ! break;
- ! }
- !
- ! goto on_err;
- ! }
- ! return 0;
- !
- ! skip_to_end:
- ! while (fgets(buf, 256, f) != NULL) {
- ! for (cp = buf; *cp && isascii(*cp) && isspace(*cp); cp++);
- ! if (strncmp(cp, "end", 3) == 0) return 0;
- ! }
- ! init_message("end missing (on %s)", argv(1));
- !
- ! on_err:
- ! init_message("on `what'?");
- ! }
-
- display_help(subject)
- char *subject;
- *** /usr/storm/nn6.3.0/init.sample Thu Jun 1 11:10:44 1989
- --- init.sample Fri Sep 8 12:46:44 1989
- ***************
- *** 8,21 ****
- # these are some of the variables you may want to set-up globally;
- # check with the manual to see if you really need them!
-
- set default-save-file +$G
- ! set header-lines _FOD=S
- set mail-format
- set newsrc
- set pager /bin/less
- set printer lp -s -dnews-pr
- set retry-on-error 2
- ! set save-counter .%02
-
- sequence
-
- --- 8,24 ----
- # these are some of the variables you may want to set-up globally;
- # check with the manual to see if you really need them!
-
- + set default-distribution local
- set default-save-file +$G
- ! set header-lines _FODn=S
- ! set include-art-id
- set mail-format
- + set mark-overlap
- set newsrc
- set pager /bin/less
- set printer lp -s -dnews-pr
- set retry-on-error 2
- ! set save-counter .%02d
-
- sequence
-
- ***************
- *** 49,55 ****
- # they mey include a @ in their private presentation
- # sequence to disable the '!!' operator, or they may include
- # the (few) groups they want to see.
- ! !!
-
- # european groups
- # read eunet.general before eunet.followup and other eunet groups
- --- 52,60 ----
- # they mey include a @ in their private presentation
- # sequence to disable the '!!' operator, or they may include
- # the (few) groups they want to see.
- ! #### ONLY USE THE FOLLOWING LINE WHEN YOU UNDERSTAND WHAT ####
- ! #### IT DOES AND YOU WANT THIS BEHAVIOUR ON YOUR SYSTEM ####
- ! # !!
-
- # european groups
- # read eunet.general before eunet.followup and other eunet groups
- *** /usr/storm/nn6.3.2/install_aux Wed Jun 28 20:07:52 1989
- --- install_aux Fri Sep 8 12:46:45 1989
- ***************
- *** 32,37 ****
- --- 32,38 ----
- echo "--------------------------------------------------------"
- if [ -f $2/MASTER ]
- then
- + echo "Run 'make online' to update the online manual"
- echo "Remember to restart $DIR/nnmaster"
- else
- echo "Now run 'make initdb'"
- *** /usr/storm/nn6.3.4/keymap.c Mon Jul 10 13:36:13 1989
- --- keymap.c Fri Sep 8 12:46:45 1989
- ***************
- *** 63,69 ****
- /* EOT ^D */ K_NEXT_HALF_PAGE,
- /* ENQ ^E */ K_UNBOUND,
- /* ACK ^F */ K_UNBOUND,
- ! /* BEL ^G */ K_UNBOUND,
- /* BS ^H */ K_PREV_PAGE,
- /* TAB ^I */ K_UNBOUND,
- /* NL ^J */ K_NEXT_LINE,
- --- 63,69 ----
- /* EOT ^D */ K_NEXT_HALF_PAGE,
- /* ENQ ^E */ K_UNBOUND,
- /* ACK ^F */ K_UNBOUND,
- ! /* BEL ^G */ K_INVALID,
- /* BS ^H */ K_PREV_PAGE,
- /* TAB ^I */ K_UNBOUND,
- /* NL ^J */ K_NEXT_LINE,
- ***************
- *** 263,269 ****
- /* EOT ^D */ K_UNBOUND,
- /* ENQ ^E */ K_UNBOUND,
- /* ACK ^F */ K_UNBOUND,
- ! /* BEL ^G */ K_UNBOUND,
- /* BS ^H */ K_PREV_LINE,
- /* TAB ^I */ K_UNBOUND,
- /* NL ^J */ K_CONTINUE,
- --- 263,269 ----
- /* EOT ^D */ K_UNBOUND,
- /* ENQ ^E */ K_UNBOUND,
- /* ACK ^F */ K_UNBOUND,
- ! /* BEL ^G */ K_INVALID,
- /* BS ^H */ K_PREV_LINE,
- /* TAB ^I */ K_UNBOUND,
- /* NL ^J */ K_CONTINUE,
- ***************
- *** 411,416 ****
- --- 411,418 ----
-
- "advance-article", K_FORW_ARTICLE, K_ONLY_MORE,
- "advance-group", K_ADVANCE_GROUP, 0,
- + "article", K_ARTICLE_ID, K_ONLY_MENU,
- + "as", K_EQUAL_KEY, 0,
-
- "back-article", K_BACK_ARTICLE, K_ONLY_MORE,
- "back-group", K_BACK_GROUP, 0,
- ***************
- *** 496,502 ****
- static int name_map_size;
- static int max_cmd_name_length = 14; /* recalculate if table is changed */
-
- ! export char global_key_map[KEY_MAP_SIZE];
-
-
- init_key_map()
- --- 498,504 ----
- static int name_map_size;
- static int max_cmd_name_length = 14; /* recalculate if table is changed */
-
- ! export unsigned char global_key_map[KEY_MAP_SIZE];
-
-
- init_key_map()
- ***************
- *** 587,593 ****
- index = strncmp(cmd->cmd_name, head, len);
- if (index < 0) continue;
- if (index > 0) break;
- ! if (cmd->cmd_code == K_MACRO)
- sprintf(tail, "%s ", cmd->cmd_name + len);
- else
- strcpy(tail, cmd->cmd_name + len);
- --- 589,597 ----
- index = strncmp(cmd->cmd_name, head, len);
- if (index < 0) continue;
- if (index > 0) break;
- ! if (cmd->cmd_code == K_MACRO ||
- ! cmd->cmd_code == K_ARTICLE_ID ||
- ! cmd->cmd_code == K_EQUAL_KEY)
- sprintf(tail, "%s ", cmd->cmd_name + len);
- else
- strcpy(tail, cmd->cmd_name + len);
- ***************
- *** 637,643 ****
- if (str[1] == '?')
- return 0177;
- else
- ! return CTRL(str[1]);
-
- if (isdigit(str[0])) {
- if (str[0] == '0')
- --- 641,647 ----
- if (str[1] == '?')
- return 0177;
- else
- ! return CONTROL_(str[1]);
-
- if (isdigit(str[0])) {
- if (str[0] == '0')
- *** /usr/storm/nn6.3.4/keymap.h Mon Jul 10 13:36:14 1989
- --- keymap.h Fri Sep 8 12:46:45 1989
- ***************
- *** 94,99 ****
- --- 94,101 ----
-
- #define K_PREVIEW 0x004f /* preview article */
-
- + #define K_EQUAL_KEY 0x0070 /* map command special symbol */
- +
- #define K_MACRO 0x0100 /* call macro */
- #define K_ARTICLE_ID 0x0200 /* article id in lower part */
-
- ***************
- *** 115,118 ****
- extern int menu_key_map[];
- extern int more_key_map[];
-
- ! extern char global_key_map[];
- --- 117,120 ----
- extern int menu_key_map[];
- extern int more_key_map[];
-
- ! extern unsigned char global_key_map[];
- *** /usr/storm/nn6.3.0/log_entry.c Thu Jun 1 11:10:45 1989
- --- log_entry.c Fri Sep 8 12:46:45 1989
- ***************
- *** 29,31 ****
- --- 29,34 ----
- nn_exit(1);
- }
-
- + suspend_nn()
- + {
- + }
- *** /usr/storm/nn6.3.4/m-i80286.h Mon Jul 10 14:47:39 1989
- --- m-i80286.h Fri Sep 8 12:46:46 1989
- ***************
- *** 12,17 ****
- --- 12,18 ----
- typedef long int32; /* -100,000 .. 100,000 */
- typedef unsigned long uint32; /* 0 .. 2^31-1 */
-
- + #define I286_BUG
-
- /*
- * Define NO_VARARGS if the varargs feature is not available
- *** /usr/storm/nn6.3.4/macro.c Mon Jul 10 13:36:16 1989
- --- macro.c Fri Sep 8 12:46:46 1989
- ***************
- *** 5,10 ****
- --- 5,11 ----
- export int in_menu_mode = 0;
- export int get_from_macro = 0;
- export int macro_debug = 0;
- + export char *dflt_enter_macro = NULL;
-
- #define M_DUMMY 0 /* do nothing (end of branch) */
-
- ***************
- *** 18,23 ****
- --- 19,25 ----
- #define M_NO 6 /* answer no to confirmation and break */
- /* -- if neither are present, take input */
-
- + #define M_PUTS 7 /* puts "..." */
- #define M_PROMPT 8 /* prompt(...) */
- #define M_ECHO 9 /* msg(...) */
-
- ***************
- *** 31,37 ****
- --- 33,41 ----
- #define M_BREAK 17 /* exit from macroes */
- #define M_RETURN 18 /* return from this macro */
-
- + #define M_SET_COMMAND 19 /* set/unset command */
-
- +
- struct macro {
- int m_type; /* entry type */
- union {
- ***************
- *** 46,62 ****
- #define m_string m_value.mu_string
- #define m_branch m_value.mu_branch
-
- ! #define NMACRO 32 /* max number of macros */
- #define MSTACK 5 /* max nesting level */
-
- ! static struct macro *macro[NMACRO]; /* macro table */
-
- static struct macro *mstack[MSTACK]; /* macro stack */
- ! static int cstack[MSTACK];
- static int m_level = 0;
-
- static struct macro *m = NULL; /* current macro */
- static int no_advance = 0;
-
- static int cur_m;
-
- --- 50,67 ----
- #define m_string m_value.mu_string
- #define m_branch m_value.mu_branch
-
- ! #define NMACRO 101 /* max number of macros */
- #define MSTACK 5 /* max nesting level */
-
- ! static struct macro *macro[NMACRO + 1]; /* macro table */
-
- static struct macro *mstack[MSTACK]; /* macro stack */
- ! static int cstack[MSTACK + 1];
- static int m_level = 0;
-
- static struct macro *m = NULL; /* current macro */
- static int no_advance = 0;
- + static int changed_prompt = 0;
-
- static int cur_m;
-
- ***************
- *** 66,72 ****
- {
- int n;
-
- ! for (n = 0; n < NMACRO; n++)
- macro[n] = NULL;
- }
-
- --- 71,77 ----
- {
- int n;
-
- ! for (n = 0; n <= NMACRO; n++)
- macro[n] = NULL;
- }
-
- ***************
- *** 98,105 ****
- * end
- */
-
-
- ! m_define(id, f)
- char *id;
- FILE *f;
- {
- --- 103,111 ----
- * end
- */
-
- + static int initial_set_commands;
-
- ! char *m_define(id, f)
- char *id;
- FILE *f;
- {
- ***************
- *** 107,115 ****
-
- if (id) {
- cur_m = atoi(id);
- ! if (cur_m < 0 || cur_m >= NMACRO) {
- m_error("macro number out of range\n", id);
- ! return 0;
- }
- } else {
- for (cur_m = 0; cur_m < NMACRO; cur_m++)
- --- 113,123 ----
-
- if (id) {
- cur_m = atoi(id);
- ! if (cur_m < 0)
- ! cur_m = NMACRO;
- ! else if (cur_m >= NMACRO) {
- m_error("macro number out of range\n", id);
- ! return (char *)0;
- }
- } else {
- for (cur_m = 0; cur_m < NMACRO; cur_m++)
- ***************
- *** 116,122 ****
- if (macro[cur_m] == NULL) break;
- if (cur_m == NMACRO) {
- init_message("No unused macro numbers");
- ! return 0;
- }
- }
-
- --- 124,130 ----
- if (macro[cur_m] == NULL) break;
- if (cur_m == NMACRO) {
- init_message("No unused macro numbers");
- ! return (char *)0;
- }
- }
-
- ***************
- *** 129,139 ****
-
- m = NULL;
- skip = 0;
- !
- while (fgets(line, 256, f)) {
- for (lp = line; *lp && isspace(*lp); lp++);
- if (*lp == NUL) continue;
- ! if (strncmp(lp, "end", 3) == 0) goto out;
- if (!skip && parse_line(lp)) {
- macro[cur_m] = NULL;
- skip++;
- --- 137,148 ----
-
- m = NULL;
- skip = 0;
- ! initial_set_commands = (cur_m == NMACRO);
- !
- while (fgets(line, 256, f)) {
- for (lp = line; *lp && isspace(*lp); lp++);
- if (*lp == NUL) continue;
- ! if (*lp == ')' || strncmp(lp, "end", 3) == 0) goto out;
- if (!skip && parse_line(lp)) {
- macro[cur_m] = NULL;
- skip++;
- ***************
- *** 146,152 ****
- out:
- if (f == stdin) raw();
- m = NULL;
- ! return 1;
- }
-
- static parse_line(lp)
- --- 155,203 ----
- out:
- if (f == stdin) raw();
- m = NULL;
- ! return (char *)macro[cur_m];
- ! }
- !
- ! char *m_get_macro(id)
- ! char *id;
- ! {
- ! if (id) {
- ! cur_m = atoi(id);
- ! if (cur_m < 0 || cur_m >= NMACRO) {
- ! m_error("macro number out of range\n", id);
- ! return (char *)0;
- ! }
- ! }
- ! return (char *)macro[cur_m];
- ! }
- !
- ! char *parse_enter_macro(f, c)
- ! FILE *f;
- ! register int c;
- ! {
- ! register char *gp;
- ! char other[FILENAME];
- ! group_header *gh;
- ! static char *last_defined = NULL;
- !
- ! while (c != EOF && c != NL && (!isascii(c) || isspace(c))) c = getc(f);
- !
- ! if (c == ')') return last_defined;
- !
- ! if (c == EOF) return (char *)NULL;
- !
- ! if (c == NL) return last_defined = m_define("-1", f);
- !
- ! gp = other;
- ! do {
- ! *gp++ = c;
- ! c = getc(f);
- ! } while (c != EOF && c != ')' && isascii(c) && !isspace(c));
- !
- ! *gp = NUL;
- ! if (gh = lookup(other)) return gh->enter_macro;
- !
- ! return m_get_macro(other);
- }
-
- static parse_line(lp)
- ***************
- *** 159,170 ****
- if (*lp == '#') break;
-
- if (*lp == ':') {
- m_new(M_COMMAND);
- m->m_int = GETC_COMMAND | K_EXTENDED_CMD;
- m_new(M_STRING);
- ! m->m_string = copy_str(lp + 1);
- break;
- }
-
- if (*lp == '?') {
- m_new(M_IS_MENU);
- --- 210,231 ----
- if (*lp == '#') break;
-
- if (*lp == ':') {
- + lp++;
- + if (initial_set_commands) {
- + if (!strncmp(lp, "set", 3) || !strncmp(lp, "unset", 5)) {
- + m_new(M_SET_COMMAND);
- + m->m_string = copy_str(lp);
- + break;
- + }
- + initial_set_commands = 0;
- + }
- m_new(M_COMMAND);
- m->m_int = GETC_COMMAND | K_EXTENDED_CMD;
- m_new(M_STRING);
- ! m->m_string = copy_str(lp);
- break;
- }
- + initial_set_commands = 0;
-
- if (*lp == '?') {
- m_new(M_IS_MENU);
- ***************
- *** 217,223 ****
- }
-
- if (*w == '"') {
- ! if (m == NULL || (m->m_type != M_PROMPT && m->m_type != M_ECHO))
- m_new(M_STRING);
- m->m_string = copy_str(w + 1);
- goto ok;
- --- 278,284 ----
- }
-
- if (*w == '"') {
- ! if (m == NULL || (m->m_type != M_PROMPT && m->m_type != M_ECHO && m->m_type != M_PUTS))
- m_new(M_STRING);
- m->m_string = copy_str(w + 1);
- goto ok;
- ***************
- *** 282,287 ****
- --- 343,353 ----
- m->m_string = "ups";
- goto ok;
- }
- + if (strcmp(w, "puts") == 0) {
- + m_new(M_PUTS);
- + m->m_string = "";
- + goto ok;
- + }
- if (strcmp(w, "input") == 0) {
- m_new(M_INPUT);
- goto ok;
- ***************
- *** 317,343 ****
- m_invoke(n)
- int n;
- {
- ! if (n < 0 || n > NMACRO || macro[n] == NULL) {
- msg("undefined macro %d", n);
- return;
- }
-
- ! if (m == NULL)
- no_advance = 0;
- else {
- ! if (m_level == MSTACK) {
- msg("Macro stack overflow");
- ! m = NULL;
- ! m_level = 0;
- return;
- }
- mstack[m_level] = m;
- cstack[m_level] = cur_m;
- - m_level++;
- }
-
- cur_m = n;
- m = macro[cur_m];
- }
-
- m_startinput()
- --- 383,421 ----
- m_invoke(n)
- int n;
- {
- ! if (n < 0) {
- ! n = NMACRO;
- ! if ((macro[n] = (struct macro *)(current_group->enter_macro)) == NULL)
- ! if ((macro[n] = (struct macro *)dflt_enter_macro) == NULL)
- ! return;
- ! } else
- ! if (n >= NMACRO || macro[n] == NULL) {
- msg("undefined macro %d", n);
- return;
- }
-
- ! if (m_level == 0)
- no_advance = 0;
- else {
- ! if (m_level > MSTACK) {
- msg("Macro stack overflow");
- ! m_break();
- return;
- }
- mstack[m_level] = m;
- cstack[m_level] = cur_m;
- }
- + m_level++;
-
- cur_m = n;
- m = macro[cur_m];
- + while (m && m->m_type == M_SET_COMMAND) {
- + char buffer[128];
- + strcpy(buffer, m->m_string);
- + if (macro_debug) { msg(":%s", buffer); user_delay(1); }
- + parse_command(buffer, 0, (FILE *)NULL);
- + m = m->m_next;
- + }
- }
-
- m_startinput()
- ***************
- *** 366,372 ****
- struct macro *m1;
-
- for (;;) {
- ! while (m == NULL && m_level > 0) {
- m_level--;
- m = mstack[m_level];
- cur_m = cstack[m_level];
- --- 444,450 ----
- struct macro *m1;
-
- for (;;) {
- ! while (m == NULL && m_level > 1) {
- m_level--;
- m = mstack[m_level];
- cur_m = cstack[m_level];
- ***************
- *** 373,378 ****
- --- 451,457 ----
- }
- if (m == NULL) {
- if (macro_debug) msg("end");
- + m_break();
- return NULL;
- }
-
- ***************
- *** 386,391 ****
- --- 465,472 ----
-
- switch (m->m_type) {
- case M_COMMAND:
- + if (m->m_int == (GETC_COMMAND | K_REDRAW))
- + changed_prompt = 0;
- case M_KEY:
- if (who == 1) goto out;
- goto err;
- ***************
- *** 403,414 ****
- --- 484,506 ----
- case M_DUMMY:
- break;
-
- + case M_PUTS:
- + fputs(m->m_string, stdout); fl;
- + break;
- +
- case M_PROMPT:
- + if (m->m_string[0] == NUL) {
- + changed_prompt = 0;
- + break;
- + }
- + if (!changed_prompt) prompt(P_SAVE);
- + changed_prompt = 1;
- prompt("\1%s\1 ", m->m_string);
- break;
-
- case M_ECHO:
- msg(m->m_string);
- + restore_xy();
- break;
-
- case M_IS_MENU:
- ***************
- *** 424,433 ****
- if ((current_group->group_flag & G_FOLDER) == 0) m = m->m_branch;
- break;
- case M_CONFIRM:
- ! if (!yes(0)) m = m->m_branch;
- break;
- case M_REJECT:
- ! if (yes(0)) m = m->m_branch;
- break;
-
- case M_VARTEST:
- --- 516,525 ----
- if ((current_group->group_flag & G_FOLDER) == 0) m = m->m_branch;
- break;
- case M_CONFIRM:
- ! if (yes(0) == 0) m = m->m_branch;
- break;
- case M_REJECT:
- ! if (yes(0) == 1) m = m->m_branch;
- break;
-
- case M_VARTEST:
- ***************
- *** 451,457 ****
- goto term;
- }
-
- ! m = m->m_next;
- }
-
- out:
- --- 543,549 ----
- goto term;
- }
-
- ! if (m) m = m->m_next;
- }
-
- out:
- ***************
- *** 464,481 ****
- msg("Error in macro %d", cur_m);
- err1:
- user_delay(1);
- ! m = NULL;
- ! m_level = 0;
- return MERROR;
-
- term:
- ! m = NULL;
- ! m_level = 0;
- return NULL;
- }
-
- m_break()
- {
- m = NULL;
- m_level = 0;
- }
- --- 556,579 ----
- msg("Error in macro %d", cur_m);
- err1:
- user_delay(1);
- ! m_break();
- return MERROR;
-
- term:
- ! m_break();
- return NULL;
- }
-
- + m_break_entry()
- + {
- + if (current_group->enter_macro || dflt_enter_macro)
- + m = NULL;
- + }
- +
- m_break()
- {
- + if (changed_prompt) prompt(P_RESTORE);
- + changed_prompt = 0;
- m = NULL;
- m_level = 0;
- }
- ***************
- *** 573,579 ****
- struct macro *m1;
-
- get_from_macro = 0;
- ! if (m && (m1 = m_call(1))) {
- if (m1 == MERROR) return 2;
- if (m1->m_type == M_INPUT) return 0;
- *cp = m1->m_int;
- --- 671,677 ----
- struct macro *m1;
-
- get_from_macro = 0;
- ! if (m_level && (m1 = m_call(1))) {
- if (m1 == MERROR) return 2;
- if (m1->m_type == M_INPUT) return 0;
- *cp = m1->m_int;
- ***************
- *** 593,599 ****
- struct macro *m1;
-
- get_from_macro = 0;
- ! if (m && (m1 = m_call(2))) {
- if (m1 == MERROR) return 2;
- if (m1->m_type == M_INPUT) return 0;
- strcpy(s, m1->m_string);
- --- 691,697 ----
- struct macro *m1;
-
- get_from_macro = 0;
- ! if (m_level && (m1 = m_call(2))) {
- if (m1 == MERROR) return 2;
- if (m1->m_type == M_INPUT) return 0;
- strcpy(s, m1->m_string);
- ***************
- *** 611,617 ****
- {
- struct macro *m1;
-
- ! if (m) {
- if (m1 = m_call(3))
- if (m1->m_type == M_NO)
- return 1;
- --- 709,718 ----
- {
- struct macro *m1;
-
- ! if (m)
- ! if (m->m_type == M_CONFIRM || m->m_type == M_REJECT) return 3;
- !
- ! if (m_level) {
- if (m1 = m_call(3))
- if (m1->m_type == M_NO)
- return 1;
- *** /usr/storm/nn6.3.4/master.c Mon Jul 10 13:36:19 1989
- --- master.c Fri Sep 8 12:46:47 1989
- ***************
- *** 177,183 ****
- nntp_close_server();
- current_group = NULL; /* for init_group */
- log_entry('N', "Can't access active file --- %s",
- ! repeat_delay ? "sleeping" : "termating");
- if (repeat_delay == 0)
- nn_exit(1);
- sleep(repeat_delay);
- --- 177,183 ----
- nntp_close_server();
- current_group = NULL; /* for init_group */
- log_entry('N', "Can't access active file --- %s",
- ! repeat_delay ? "sleeping" : "terminating");
- if (repeat_delay == 0)
- nn_exit(1);
- sleep(repeat_delay);
- ***************
- *** 751,756 ****
- --- 751,760 ----
- sys_error("Dummy routine called by master: %s", name);
- }
-
- + #ifdef HAVE_JOBCONTROL
- + suspend_nn()
- + {}
- + #endif
-
- #ifdef NNTP /* XXX */
- msg() {}
- *** /usr/storm/nn6.3.4/menu.c Mon Jul 10 13:36:20 1989
- --- menu.c Fri Sep 8 12:46:47 1989
- ***************
- *** 16,21 ****
- --- 16,24 ----
- export int novice = 1; /* novice mode -- use extended prompts */
- export int long_menu = 0; /* don't put empty lines around menu lines */
- export int delay_redraw = 0; /* prompt again if :-command clears screen */
- + export int slow_mode = 0; /* mark selected articles with *s */
- + export int re_layout = 0; /* Re: format presentation on menus */
- + export int collapse_subject = 25; /* collapse long subjects at position */
-
- export char *delayed_msg = NULL; /* give to msg() after redraw */
- export long dl_msg_arg = 0; /* optional arg to delayed_msg */
- ***************
- *** 23,28 ****
- --- 26,35 ----
- import also_read_articles;
- import merged_menu;
-
- + #ifdef NNTP
- + import int use_nntp; /* is nntp in use? */
- + #endif
- +
- extern group_completion();
-
- static regexp *regular_expr = NULL;
- ***************
- *** 63,69 ****
- if (how == curhow) return;
-
- lno = firstl + cura;
- ! must_print = STANDOUT;
-
- toggle:
-
- --- 70,76 ----
- if (how == curhow) return;
-
- lno = firstl + cura;
- ! must_print = !slow_mode && STANDOUT;
-
- toggle:
-
- ***************
- *** 137,143 ****
-
- if (must_print) {
-
- ! if (fmt_linenum > 4) fmt_linenum = 1;
-
- if (ah->flag & (A_CANCEL | A_LEAVE | A_LEAVE_NEXT | A_READ)) {
- gotoxy(1, lno);
- --- 144,150 ----
-
- if (must_print) {
-
- ! if (fmt_linenum > 5) fmt_linenum = 1;
-
- if (ah->flag & (A_CANCEL | A_LEAVE | A_LEAVE_NEXT | A_READ)) {
- gotoxy(1, lno);
- ***************
- *** 148,161 ****
- '='
- );
- } else
- ! if (how == ON) {
- if (so_gotoxy(1, lno, 1) == 0) putchar('*');
- } else {
- gotoxy(1, lno);
- ! putchar(' ');
- }
-
- - if (fmt_linenum > 1) lnum = 0; else
- if (ah->lines < 10) lnum = 1; else
- if (ah->lines < 100) lnum = 2; else
- if (ah->lines < 1000) lnum = 3; else
- --- 155,167 ----
- '='
- );
- } else
- ! if (how == ON && !slow_mode) {
- if (so_gotoxy(1, lno, 1) == 0) putchar('*');
- } else {
- gotoxy(1, lno);
- ! putchar(how == ON ? '*' : ' ');
- }
-
- if (ah->lines < 10) lnum = 1; else
- if (ah->lines < 100) lnum = 2; else
- if (ah->lines < 1000) lnum = 3; else
- ***************
- *** 169,180 ****
- lsubj -= NAME_LENGTH + 1 + 2 + lnum; /* name. .subj. +.lines */
- so_printf("%-*s ", NAME_LENGTH, ah->sender);
- break;
- !
- case 1:
- ! lsubj -= NAME_LENGTH + 4;
- /* name.lines. .subj (name may be shortened) */
- lname = NAME_LENGTH + 2 - lnum;
- - lsubj -= 4; /* 2 columns for the number + 2 spaces */
- so_printf("%-*.*s ", lname, lname, ah->sender);
- so_printf(ah->lines >= 0 ? "%d " : "? ", ah->lines);
- break;
- --- 175,194 ----
- lsubj -= NAME_LENGTH + 1 + 2 + lnum; /* name. .subj. +.lines */
- so_printf("%-*s ", NAME_LENGTH, ah->sender);
- break;
- !
- ! case 5:
- ! if (ah->subj_length > (lsubj - NAME_LENGTH - 5))
- ! if (fmt_rptsubj || lno == firstl || (ah->flag & A_SAME) == 0) {
- ! so_printf(" ");
- ! lsubj -= 2;
- ! break;
- ! }
- ! /* else use layout 1, so fall thru */
- !
- case 1:
- ! lsubj -= NAME_LENGTH + 5;
- /* name.lines. .subj (name may be shortened) */
- lname = NAME_LENGTH + 2 - lnum;
- so_printf("%-*.*s ", lname, lname, ah->sender);
- so_printf(ah->lines >= 0 ? "%d " : "? ", ah->lines);
- break;
- ***************
- *** 194,206 ****
- }
-
- if (!fmt_rptsubj && lno > firstl && ah->flag & A_SAME) {
- ! if (ah->replies == 0)
- so_printf("-");
- - else
- - prt_replies(ah->replies);
- } else {
- lsubj -= prt_replies(ah->replies);
- ! so_printf("%-.*s", lsubj, ah->subject);
- }
-
- if (fmt_linenum == 0)
- --- 208,228 ----
- }
-
- if (!fmt_rptsubj && lno > firstl && ah->flag & A_SAME) {
- ! if (ah->replies == 0 || prt_replies(ah->replies) == 0)
- so_printf("-");
- } else {
- lsubj -= prt_replies(ah->replies);
- ! if (lsubj >= ah->subj_length)
- ! so_printf("%s", ah->subject);
- ! else
- ! if (collapse_subject < 0)
- ! so_printf("%-.*s", lsubj, ah->subject);
- ! else {
- ! if (collapse_subject > 0)
- ! so_printf("%-.*s", collapse_subject, ah->subject);
- ! lsubj -= 2 + collapse_subject;
- ! so_printf("<>%s", ah->subject + ah->subj_length - lsubj);
- ! }
- }
-
- if (fmt_linenum == 0)
- ***************
- *** 218,224 ****
- --- 240,263 ----
-
- static prt_replies(level)
- {
- + int re;
- +
- if (level == 0) return 0;
- + re = level & 0x80;
- + level &= 0x7f;
- +
- + switch (re_layout) {
- + case 1:
- + if (!re) return 0;
- + so_printf(">");
- + return 1;
- + case 2:
- + so_printf("%d>", level);
- + return level < 10 ? 2 : 3;
- + case 3:
- + so_printf("Re: ");
- + return 4;
- + }
-
- if (level < 10) {
- so_printf("%-.*s", level, ">>>>>>>>>");
- ***************
- *** 305,311 ****
- static menu_level = 0;
- char purpose[80], pr_fmt[60];
- extern int enable_stop, file_completion();
- ! extern int alt_cmd_key, in_menu_mode, slow_mode, any_message;
- article_number elim_list[3];
-
- #define menu_return(cmd) \
- --- 344,350 ----
- static menu_level = 0;
- char purpose[80], pr_fmt[60];
- extern int enable_stop, file_completion();
- ! extern int alt_cmd_key, in_menu_mode, any_message;
- article_number elim_list[3];
-
- #define menu_return(cmd) \
- ***************
- *** 453,458 ****
- --- 492,498 ----
- if (numa >= 0) {
- gotoxy(0, firstl + cura);
- fl; /* place cursor at current article id */
- + save_xy();
- }
-
- last_k_cmd = cur_k_cmd;
- ***************
- *** 466,474 ****
- --- 506,516 ----
- case K_UNBOUND:
- ding();
- flush_input();
- + case K_INVALID:
- goto same_prompt;
-
- case K_REDRAW:
- + next_cura = cura;
- goto redraw;
-
- case K_LAST_MESSAGE:
- ***************
- *** 492,497 ****
- --- 534,542 ----
- case K_EXTENDED_CMD:
- switch (alt_command()) {
-
- + case AC_UNCHANGED:
- + goto same_prompt;
- +
- case AC_QUIT:
- menu_return( ME_QUIT );
-
- ***************
- *** 543,548 ****
- --- 588,596 ----
-
- m_startinput();
-
- + if (novice)
- + msg(" * selected articles on this page, + all selected articles");
- +
- while (!save_selected && !did_unshar) {
- prompt("\1%s\1 %.*s Article (* +): ",
- savemode, Columns - 25, fname);
- ***************
- *** 636,643 ****
- }
- goto Prompt;
-
- - case K_REPLY:
- case K_FOLLOW_UP:
- if (numa < 0) goto nextmenu;
-
- prompt(k_cmd == K_REPLY ?
- --- 684,694 ----
- }
- goto Prompt;
-
- case K_FOLLOW_UP:
- + #ifdef NNTP_POST
- + if (use_nntp && nntp_no_post()) goto same_prompt;
- + #endif
- + case K_REPLY:
- if (numa < 0) goto nextmenu;
-
- prompt(k_cmd == K_REPLY ?
- ***************
- *** 651,656 ****
- --- 702,712 ----
- goto Prompt;
-
- case K_POST:
- +
- + #ifdef NNTP_POST
- + if (use_nntp && nntp_no_post())
- + goto same_prompt;
- + #endif
- if (post_menu()) goto redraw;
- goto Prompt;
-
- ***************
- *** 699,705 ****
- goto Prompt;
-
- case K_GROUP_OVERVIEW:
- ! group_overview(0);
- goto redraw;
-
- case K_KILL_HANDLING:
- --- 755,761 ----
- goto Prompt;
-
- case K_GROUP_OVERVIEW:
- ! group_overview(-1);
- goto redraw;
-
- case K_KILL_HANDLING:
- ***************
- *** 1339,1347 ****
- extern char erase_key;
- extern int get_from_macro;
- extern int alt_completion();
- !
- ! prompt(":");
- ! ok_val = AC_PROMPT;
-
- again:
-
- --- 1395,1407 ----
- extern char erase_key;
- extern int get_from_macro;
- extern int alt_completion();
- !
- ! if (get_from_macro)
- ! ok_val = AC_UNCHANGED;
- ! else {
- ! prompt(":");
- ! ok_val = AC_PROMPT;
- ! }
-
- again:
-
- *** /usr/storm/nn6.3.4/menu.h Mon Jul 10 13:36:21 1989
- --- menu.h Fri Sep 8 12:46:48 1989
- ***************
- *** 55,57 ****
- --- 55,58 ----
- #define AC_REORDER 3 /* articles have been reordered */
- #define AC_HEADER 4 /* update header line + Prompt */
- #define AC_KEYCMD 5 /* alt_cmd_key contains command */
- + #define AC_UNCHANGED 6 /* no display changes */
- *** /usr/storm/nn6.3.4/more.c Mon Jul 10 13:36:22 1989
- --- more.c Fri Sep 8 12:46:48 1989
- ***************
- *** 6,19 ****
- --- 6,23 ----
- #include "regexp.h"
-
- export int monitor_mode = 0;
- + export int compress_mode = 0;
- export int show_article_date = 1;
- export int first_page_lines = 0;
- export int overlap = 2;
- export int mark_overlap = 0;
- export char *header_lines = NULL;
- + export int min_pv_window = 7;
- + export int wrap_headers = 6;
-
- import int preview_window;
- import int novice;
- + import int slow_mode;
-
- import char *delayed_msg;
- import long dl_msg_arg;
- ***************
- *** 49,54 ****
- --- 53,61 ----
- 'W', "Followup-To", &news.ng_follow, 0,
- 'X', "References", &news.ng_ref, 0,
- 'Y', "Summary", &news.ng_summ, 0,
- + 'd', "Date-Received", &news.ng_rdate, 0,
- + 'n', "Newsgroups", &news.ng_groups, 0,
- + 'x', "Back-Ref", &news.ng_bref, 0,
- 0
- };
-
- ***************
- *** 154,160 ****
- in_menu_mode = 0;
-
- if (screen_offset)
- ! if (preview_window < 1 && Lines - screen_offset < 6)
- screen_offset = 0;
- else {
- so_printxy(0, screen_offset++, "%s: %s ", ah->sender, ah->subject);
- --- 161,167 ----
- in_menu_mode = 0;
-
- if (screen_offset)
- ! if (preview_window < 1 && Lines - screen_offset < min_pv_window)
- screen_offset = 0;
- else {
- so_printxy(0, screen_offset++, "%s: %s ", ah->sender, ah->subject);
- ***************
- *** 184,190 ****
- if (lastl == 0) lastl = 1; /* impossible ? */
-
- rot13 = 0;
- ! compress_space = 0;
- last_ff_line = goto_line = -1, prev_goto = 1;
- match_lines = match_redraw = match_expr = 0;
- underline_line = -1;
- --- 191,197 ----
- if (lastl == 0) lastl = 1; /* impossible ? */
-
- rot13 = 0;
- ! compress_space = compress_mode;
- last_ff_line = goto_line = -1, prev_goto = 1;
- match_lines = match_redraw = match_expr = 0;
- underline_line = -1;
- ***************
- *** 281,291 ****
- } else
- if ((lp = *(hdef->news)) == NULL)
- break;
- gotoxy(0, lno++);
- - c = strlen(hdef->text) + 2;
- - col = c + strlen(lp);
- - if (col > Columns) lp[Columns - c] = 0;
- printf("%s: ", hdef->text);
- switch (hdr_mode) {
- case 0:
- break;
- --- 288,300 ----
- } else
- if ((lp = *(hdef->news)) == NULL)
- break;
- + if (*hdrline == 'n')
- + if (strchr(lp, ',') == NULL) break;
- +
- gotoxy(0, lno++);
- printf("%s: ", hdef->text);
- + c = col = strlen(hdef->text) + 2;
- + split_header_line:
- switch (hdr_mode) {
- case 0:
- break;
- ***************
- *** 296,302 ****
- underline(1);
- break;
- }
- ! printf("%s", lp);
- switch (hdr_mode) {
- case 0:
- break;
- --- 305,324 ----
- underline(1);
- break;
- }
- ! while (*lp && c < Columns) {
- ! if (isspace(*lp)) {
- ! while (lp[1] && isspace(lp[1])) lp++;
- ! if (wrap_headers > 0 &&
- ! (c + wrap_headers) >= Columns &&
- ! strlen(lp) >= wrap_headers) {
- ! lp++;
- ! break;
- ! }
- ! *lp = SP;
- ! }
- ! putchar(*lp++);
- ! c++;
- ! }
- switch (hdr_mode) {
- case 0:
- break;
- ***************
- *** 307,312 ****
- --- 329,339 ----
- underline(0);
- break;
- }
- + if (*lp && wrap_headers >= 0) {
- + gotoxy(col, lno++);
- + c = col;
- + goto split_header_line;
- + }
- break;
- }
- hdr_mode = 0;
- ***************
- *** 649,654 ****
- --- 676,682 ----
- switch (c) {
- case K_UNBOUND:
- ding();
- + case K_INVALID:
- goto same_prompt;
-
- case K_REDRAW:
- ***************
- *** 693,698 ****
- --- 721,729 ----
- case K_EXTENDED_CMD:
- switch (alt_command()) {
-
- + case AC_UNCHANGED:
- + goto same_prompt;
- +
- case AC_QUIT:
- more_return( MC_QUIT );
-
- ***************
- *** 733,746 ****
-
- goto Prompt;
-
- - case K_REPLY:
- case K_FOLLOW_UP:
- case K_MAIL_OR_FORWARD:
- ! if (answer(ah, c, -1)) clrdisp();
- goto Prompt;
-
- case K_POST:
- ! if (post_menu()) clrdisp();
- goto Prompt;
-
- case K_CANCEL:
- --- 764,782 ----
-
- goto Prompt;
-
- case K_FOLLOW_UP:
- + #ifdef NNTP_POST
- + if (use_nntp && nntp_no_post()) goto Prompt;
- + #endif
- + case K_REPLY:
- case K_MAIL_OR_FORWARD:
- ! if (answer(ah, c, -1))
- ! if (slow_mode) clrdisp(); else goto redraw;
- goto Prompt;
-
- case K_POST:
- ! if (post_menu())
- ! if (slow_mode) clrdisp(); else goto redraw;
- goto Prompt;
-
- case K_CANCEL:
- ***************
- *** 760,766 ****
- more_return(MC_NEXTGROUP);
-
- case K_GROUP_OVERVIEW:
- ! group_overview(0);
- goto redraw;
-
- case K_KILL_HANDLING:
- --- 796,802 ----
- more_return(MC_NEXTGROUP);
-
- case K_GROUP_OVERVIEW:
- ! group_overview(-1);
- goto redraw;
-
- case K_KILL_HANDLING:
- ***************
- *** 958,964 ****
-
- case K_LEAVE_ARTICLE:
- ah->flag &= ~(A_SELECT | A_AUTO | A_READ);
- ! ah->flag |= A_LEAVE;
- /* fall thru */
-
- case K_NEXT_ARTICLE:
- --- 994,1000 ----
-
- case K_LEAVE_ARTICLE:
- ah->flag &= ~(A_SELECT | A_AUTO | A_READ);
- ! ah->flag |= (mode & MM_PREVIEW) ? A_SELECT : A_LEAVE;
- /* fall thru */
-
- case K_NEXT_ARTICLE:
- *** /usr/storm/nn6.3.4/news.c Mon Jul 10 13:36:23 1989
- --- news.c Fri Sep 8 12:46:48 1989
- ***************
- *** 54,59 ****
- --- 54,60 ----
- news.ng_subj = NULL;
- news.ng_groups = NULL;
- news.ng_ref = NULL;
- + news.ng_bref = NULL;
-
- news.ng_xlines = NULL;
-
- ***************
- *** 68,73 ****
- --- 69,75 ----
- news.ng_appr = NULL;
- news.ng_summ = NULL;
- news.ng_date = NULL;
- + news.ng_rdate = NULL;
- }
-
- if (modes & GET_DATE_ONLY)
- ***************
- *** 176,184 ****
- --- 178,191 ----
- check("pproved: ", 9, ng_appr);
- break;
-
- + case 'B':
- + check("ack-eferences: ",15, ng_bref);
- + break;
- +
- case 'D':
- check("ate: ", 5, ng_date);
- if (!all) break;
- + check("ate-Received: ", 14, ng_rdate);
- check("istribution: ", 13, ng_dist);
- break;
-
- *** /usr/storm/nn6.3.4/news.h Mon Jul 10 13:36:24 1989
- --- news.h Fri Sep 8 12:46:48 1989
- ***************
- *** 25,30 ****
- --- 25,33 ----
- char *ng_summ; /* summary */
-
- char *ng_date; /* date */
- +
- + char *ng_rdate; /* date-received (News 3) */
- + char *ng_bref; /* back-references (News 3) */
-
- char *ng_xlines; /* lines (from header) */
- int ng_lines; /* lines (decoded) */
- *** /usr/storm/nn6.3.4/nn.1 Mon Jul 10 13:36:25 1989
- --- nn.1 Fri Sep 8 12:46:50 1989
- ***************
- *** 807,813 ****
- appear on the screen, and the menu or article text will be redrawn when
- the process is finished.
- The output is also saved in (or appended to) a file named
- ! \fIUnshar.Result\fP in the unshar directory.
- .TP
- \&\fB:decode\fP {\fBdecode\fP}
- Decode \fIuuencoded\fP articles into binary files. You will be
- --- 807,818 ----
- appear on the screen, and the menu or article text will be redrawn when
- the process is finished.
- The output is also saved in (or appended to) a file named
- ! \fIUnshar.Result\fP in the unshar directory.
- ! The file specified in \fBunshar-header-file\fP (default
- ! "Unshar.Headers") in the unshar directory will
- ! contain the header and initial text (before the shar data) from the
- ! article. You can use the `G' {\fBgoto-group\fP} command to look at
- ! the Unshar.Headers file.
- .TP
- \&\fB:decode\fP {\fBdecode\fP}
- Decode \fIuuencoded\fP articles into binary files. You will be
- ***************
- *** 824,829 ****
- --- 829,837 ----
- decoded file using the checksum which is normally contained in the
- original article. (Actually, you are also supposed to do this after
- decoding with a stand-alone uudecode program).
- + The header and initial information in the decoded articles are saved
- + in the file specified in \fBdecode-header-file\fP (default
- + "Decode.Headers") in the same directory as the decoded files.
- .LP
- In reading mode, the following keys can also be used to invoke the
- save commands:
- ***************
- *** 1581,1589 ****
- groups. Any other
- .I mode
- results in a listing of the number of unread articles in all
- ! subscribed groups (same as the
- ! .B Y
- ! command).
- .TP
- \fB:sort\fP [ \fImode\fP ]
- Reorder the articles on the menu according to
- --- 1589,1598 ----
- groups. Any other
- .I mode
- results in a listing of the number of unread articles in all
- ! subscribed groups including those you have suppressed with the `!'
- ! symbol in the group presentation sequence. To get just the currently
- ! unread groups in the presentation sequence, use the `Y'
- ! {\fBoverview\fP} command.
- .TP
- \fB:sort\fP [ \fImode\fP ]
- Reorder the articles on the menu according to
- ***************
- *** 1700,1705 ****
- --- 1709,1725 ----
- .LP
- The following variables are available:
- .TP
- + \fBalso-subgroups\fP (boolean, default true)
- + When set, a group name in the presentation sequence will also cause
- + all the subgroups of the group to be included, for example, comp.unix
- + will also include comp.unix.questions, etc. When \fBalso-subgroups\fP
- + is not set, subgroups are only included if the group name is followed
- + by a `.' in which case the main group is \fInot\fP included, i.e.
- + `comp.unix' is not included when `comp.unix.' is specified in the
- + presentation sequence, and vice-versa. Following a group name by an
- + asterisk `*', e.g. comp.unix*, will include the group as well as all
- + subgroups independently of the setting of \fBalso-subgroups\fP.
- + .TP
- \fBbackup\fP (boolean, default true)
- Backup the rc file on start-up. Setting
- .B backup
- ***************
- *** 1709,1714 ****
- --- 1729,1746 ----
- which articles have been read). You can then exit
- \fInn\fP without updating the rc file with the \fB:q!\fP command.
- .TP
- + \fBcollapse-subject\fP \fIoffset\fP (integer, default 25)
- + When set (non-negative), subject lines which are too long to be
- + presented in full on the menus will be "collapsed" by removing a
- + sufficient number of characters from the subject starting at the given
- + \fIoffset\fP in the subject. This is useful in source groups where
- + the "Part (01/10)" string sometimes disappears from the menu. When
- + not set (or negative), the subjects are truncated.
- + .TP
- + \fBcolumns\fP \fIcol\fP (integer, default screen width)
- + This variable contains the screen width i.e. character positions per
- + line.
- + .TP
- \fBcomp1-key\fP \fIkey\fP (key, default \fBspace\fP)
- The key which gives the first/next completion, and the default value
- when \fInn\fP is prompting for a string, e.g. a file name.
- ***************
- *** 1718,1731 ****
- completion for the next component
- when \fInn\fP is prompting for a string, e.g. a file name.
- .TP
- ! \fBconfirm\fP (boolean, default false)
- ! In some cases, \fInn\fP will sleep one second (or more) when it has shown a
- ! message to the user, e.g. in connection with macro debugging. Setting
- ! .B confirm
- ! will cause \fInn\fP to
- ! \fIwait\fP for you to confirm all messages by hitting any
- ! key. (It will show the symbol <> to indicate that it is awaiting
- ! confirmation.)
- .TP
- \fBconfirm-append\fP (boolean, default false)
- Normally when
- --- 1750,1760 ----
- completion for the next component
- when \fInn\fP is prompting for a string, e.g. a file name.
- .TP
- ! \fBcompress\fP (boolean, default false)
- ! This variable controls whether text compression (see the
- ! \fBcompress\fP command) is turned on or off when an article is
- ! shown. The compression is still toggled for the current article with
- ! the \fBcompress\fP command key.
- .TP
- \fBconfirm-append\fP (boolean, default false)
- Normally when
- ***************
- *** 1735,1740 ****
- --- 1764,1785 ----
- is set, you will also be asked for confirmation before appending an
- article to an existing file.
- .TP
- + \fBconfirm-auto-quit\fP (boolean, default false)
- + When set, \fInn\fP will ask for confirmation before quitting after
- + having read the last group. If not confirmed, \fInn\fP will recycle
- + the presentation sequence looking for groups that were skipped with
- + the `N' {\fBnext-group\fP} command. But it will not look for new
- + articles arrived since the invokation of \fInn\fP.
- + .TP
- + \fBconfirm-messages\fP (boolean, default false)
- + In some cases, \fInn\fP will sleep one second (or more) when it has shown a
- + message to the user, e.g. in connection with macro debugging. Setting
- + .B confirm-messages
- + will cause \fInn\fP to
- + \fIwait\fP for you to confirm all messages by hitting any
- + key. (It will show the symbol <> to indicate that it is awaiting
- + confirmation.)
- + .TP
- \fBcross-post\fP (boolean, default false)
- Normally, \fInn\fP will only show cross-posted articles in the first
- subscribed group on the Newsgroups: line. When
- ***************
- *** 1749,1754 ****
- --- 1794,1806 ----
- \fBdebug\fP \fImask\fP (integer, default 0)
- Look in the source if you are going to use this.
- .TP
- + \fBdecode-header-file\fP \fIfile\fP (string, default "Decode.Headers")
- + The name of the file in which the header and initial text of articles
- + decoded with the \fB:decode\fP command is saved. Unless the file name
- + starts with a `/', the file will be created in the same directory as
- + the decoded files. The information is not saved if this variable is
- + not set.
- + .TP
- \fBdefault-distribution\fP \fIdistr\fP (string, default not set)
- The distribution to use as the default suggestion when posting
- articles using the \fBpost\fP command. If it is not set, the
- ***************
- *** 1761,1771 ****
- mode.
- .TP
- \fBdelay-redraw\fP (boolean, default false)
- ! Normally, \fInn\fP will redraw the screen immediately after an
- ! extended command (:command) which cleared the screen. If
- ! \fBdelay-redraw\fP is set \fInn\fP will prompt for a new command
- ! without redrawing the screen; it is redrawn when you give an empty
- ! reply.
- .TP
- \fBerase-key\fP \fIkey\fP (key, default tty erase key)
- The key which erases the last input character
- --- 1813,1822 ----
- mode.
- .TP
- \fBdelay-redraw\fP (boolean, default false)
- ! Normally, \fInn\fP will redraw the screen after extended
- ! commands (:cmd) that clear the screen. When \fBdelay-redraw\fP is set
- ! \fInn\fP will prompt for another extended command instead of redrawing
- ! the screen (hit \fBreturn\fP to redraw).
- .TP
- \fBerase-key\fP \fIkey\fP (key, default tty erase key)
- The key which erases the last input character
- ***************
- *** 1835,1840 ****
- --- 1886,1894 ----
- as read. This is useful to get up-to-date quickly if you have not
- read news for a longer period.
- .TP
- + \fBlines\fP \fIlin\fP (integer, default screen hight)
- + This variable contains the screen hight i.e. number of lines.
- + .TP
- \fBlong-menu\fP (boolean, default false)
- If set \fInn\fP will not put an empty line after the header line and
- an empty line before the prompt line; this gives you two extra menu
- ***************
- *** 1876,1881 ****
- --- 1930,1943 ----
- of the terminal if possible) to indicate the end of the overlap (see the
- \fBoverlap\fP variable).
- .TP
- + \fBmin-window\fP \fIsize\fP (integer, default 7)
- + When the \fBwindow\fP variable is not set, \fInn\fP will clear the
- + screen to preview an article if there are less than \fIsize\fP unused
- + lines at the bottom of the menu screen.
- + .TP
- + \fBmmdf-format\fP (boolean, default false)
- + When set, \fInn\fP will save articles in MMDF format.
- + .TP
- \fBmonitor\fP (boolean, default false)
- When set, \fInn\fP will show
- .I all
- ***************
- *** 1941,1946 ****
- --- 2003,2021 ----
- Instead it uses the save file specified for the current group in the
- init file or the default save file.
- .TP
- + \fBre-layout\fP \fIN\fP (integer, default 0)
- + Normally on the menu, \fInn\fP will prefix the subject a number of
- + `>'s corresponding to the number of references on the References:
- + line. The \fBre-layout\fP variable may be set to use a different
- + prefix on the subjects:
- + .br
- + .nf
- + 0: One `>' per reference is shown (default).
- + 1: Only a single `>' is shown.
- + 2: The number of references is shown as `n>'
- + 3: A single Re: is shown.
- + .fi
- + .TP
- \fBrecord\fP \fIfile\fP (string, no default)
- Setting this
- .I pseudo
- ***************
- *** 1976,1981 ****
- --- 2051,2074 ----
- .B \-Q
- option.
- .TP
- + \fBslow-mode\fP (boolean, default false)
- + When set, \fInn\fP will cut down on the screen output to give better
- + response time at low speed.
- + Normally, \fInn\fP will use standout mode (if possible) to mark
- + selected articles on the menu, but when \fBslow-mode\fP is set, \fInn\fP will
- + just put an asterisk `*' next to the article identifier on selected
- + articles. Also when \fBslow-mode\fP is set \fInn\fP will avoid
- + redrawing the screen in the following cases: After a \fBgoto-group\fP
- + command an empty menu is shown (hit \fBspace\fP to make it appear),
- + and after responding to an article, only the prompt line is shown (use
- + ^L to redraw the screen). To avoid redrawing the screen aftern an
- + extended command, set the \fBdelay-redraw\fP variable as well.
- + .TP
- + \fBslow-speed\fP \fIspeed\fP (integer, default 1200)
- + If the terminal is running at this baud rate or lower, the \fBon
- + slow\fP (see the section on init files) condition will be true, and
- + the \fBon fast\fP will be false (and vice-versa).
- + .TP
- \fBsort\fP (boolean, default true)
- When set, \fInn\fP will sort articles according to subject (and age
- for identical subjects). Otherwise, articles will be presented in
- ***************
- *** 2006,2015 ****
- .I sysline (1)
- utility.
- .TP
- \fBwindow\fP \fIsize\fP (integer, default not set)
- When set, \fInn\fP will reserve the last \fIsize\fP lines of the menu
- screen for a preview window. If not set, \fInn\fP will clear the
- ! screen to preview an article if there are too few empty lines at the
- bottom of the screen. As a side effect, it can also be used to reduce
- the size of the menus, which may be useful on slow terminals.
- .TP
- --- 2099,2123 ----
- .I sysline (1)
- utility.
- .TP
- + \fBunshar-header-file\fP \fIfile\fP (string, default "Unshar.Headers")
- + The name of the file in which the header and initial text of articles
- + unpacked with the \fB:unshar\fP command is saved. Unless the file name
- + starts with a `/', the file will be created in the same directory as
- + the unpacked files. The information is not saved if this variable is
- + not set. Setting it to "Unshar.Result" will cause the headers and the
- + results from the unpacking process to be merged in a meaningful way
- + (unless \fBmmdf-format\fP is set).
- + .TP
- + \fBvisible-bell\fP (boolean, default true)
- + When set, \fInn\fP will flash the screeen instead of "ringing the
- + bell" if the visible bell (flash) capability is defined in the
- + termcap/terminfo database.
- + .TP
- \fBwindow\fP \fIsize\fP (integer, default not set)
- When set, \fInn\fP will reserve the last \fIsize\fP lines of the menu
- screen for a preview window. If not set, \fInn\fP will clear the
- ! screen to preview an article if there are less than \fBmin-window\fP
- ! lines at the
- bottom of the screen. As a side effect, it can also be used to reduce
- the size of the menus, which may be useful on slow terminals.
- .TP
- ***************
- *** 2017,2022 ****
- --- 2125,2138 ----
- The key which erases the last input component or word
- when \fInn\fP is prompting for a string, e.g. the last name in a path
- name.
- + .TP
- + \fBwrap-header-margin\fP \fIsize\fP (integer, default 6)
- + When set (non-negative), the customized header fields specified in
- + \fBheader-lines\fP will be split across several lines if they don't
- + fit on one line. When \fIsize\fP is greater than zero, lines will be
- + split at the first space occurring in the last \fIsize\fP columns of
- + the line. If not set (or negative), long header lines will be
- + truncated if they don't fit on a single line.
- .SH CUSTOMIZED ARTICLE HEADER PRESENTATION
- Normally, \fInn\fP will just print a (high-lighted) single line header
- containing the author, subject, and date (optional) of the article
- ***************
- *** 2046,2051 ****
- --- 2162,2169 ----
- .br
- \fBD\fP Date:
- .br
- + \fBd\fP Date-Received:
- + .br
- \fBF\fP From:
- .br
- \fBI\fP Message-Id:
- ***************
- *** 2056,2061 ****
- --- 2174,2181 ----
- .br
- \fBN\fP Newsgroups:
- .br
- + \fBn\fP Newsgroups: (but only if cross posted)
- + .br
- \fBO\fP Organization:
- .br
- \fBP\fP Path:
- ***************
- *** 2068,2073 ****
- --- 2188,2195 ----
- .br
- \fBX\fP References:
- .br
- + \fBx\fP Back-References:
- + .br
- \fBY\fP Summary:
- .in -8n
- .DT
- ***************
- *** 2185,2191 ****
- Reserve \fIN\fP lines of the menu screen for a preview window. If
- \fIN\fP is omitted, the preview window is set to 5 lines.
- .TP
- ! \-\fBW\fP {\fBtoggle confirm\fP}
- [Don't] Wait for confirmation on all messages.
- .TP
- \-\fBx\fP[\fIN\fP] {\fBset old N\fP}
- --- 2307,2313 ----
- Reserve \fIN\fP lines of the menu screen for a preview window. If
- \fIN\fP is omitted, the preview window is set to 5 lines.
- .TP
- ! \-\fBW\fP {\fBtoggle confirm-messages\fP}
- [Don't] Wait for confirmation on all messages.
- .TP
- \-\fBx\fP[\fIN\fP] {\fBset old N\fP}
- ***************
- *** 2275,2280 ****
- --- 2397,2411 ----
- command, the following command is used:
- .sp 0.5v
- map menu #0 select
- + .sp 0.5v
- + To remap a key to select a specific article on the menu (which the `a'
- + through `z' keys do by default), the \fIcommand\fP must be specified
- + as `\fBarticle\fP \fIN\fP' where \fIN\fP is the entry number on the
- + menu counted from zero (i.e. a=0, b=1, ..., z=25, 0=26, ..., 9=35).
- + For example, to map `J' to select article `j', the following
- + command is used:
- + .sp 0.5v
- + map menu J article 9
- .TP
- .B The reading mode key binding table
- This table defines for each key which command should be invoked when
- ***************
- *** 2286,2291 ****
- --- 2417,2437 ----
- in reading mode is:
- .sp 0.5v
- \fBmap show\fP \fIkey command\fP
- + .TP
- + .B Mapping keys in both modes
- + Using the pseudo-keymap `both', it is possible to map a key to a
- + command in both selection and reading mode at once. For example, to
- + map the home key to macro number 5 in both modes, the following
- + command can be used:
- + .sp 0.5v
- + map both #0 macro 5
- + .TP
- + .B Aliasing
- + A key can also be mapped directly to the command currently bound to
- + another key. Later remapping of the other key will not change the
- + mapping of the `aliased' key. This is done using the following command:
- + .sp 0.5v
- + map \fIkeymap new-key\fP \fBas\fP \fIold-key\fP
- .LP
- Keys and character names are specified using the following notation:
- .TP
- ***************
- *** 2339,2344 ****
- --- 2485,2492 ----
- .br
- \fBadvance-group\fP A A
- .br
- + \fBarticle\fP \fIN\fP a-z0-9 \fBnix\fP
- + .br
- \fBback-article\fP \fBnix\fP b
- .br
- \fBback-group\fP B B
- ***************
- *** 2477,2484 ****
- .B :define
- command, macro definitions are normally placed in the
- .I init
- ! file. Macros are numbered from 0 to 31, i.e. it is possible to define
- ! a total of 32 different macros.
- .LP
- To define macro number \fIM\fP, the following construction is used
- (the line breaks are mandatory):
- --- 2625,2632 ----
- .B :define
- command, macro definitions are normally placed in the
- .I init
- ! file. Macros are numbered from 0 to 100, i.e. it is possible to define
- ! a total of 101 different macros.
- .LP
- To define macro number \fIM\fP, the following construction is used
- (the line breaks are mandatory):
- ***************
- *** 2593,2598 ****
- --- 2741,2757 ----
- must be enclosed in double quotes. Example:
- .br
- \fBprompt\fP "Enter recipient name"
- + .br
- + When the macro terminates, the original prompt shown on entry to the
- + macro will automatically be redrawn. If this is not desireable (e.g.
- + if the macro goes from selection to reading mode), the redrawing of
- + the prompt can be disabled by using a \fBprompt\fP command with an
- + empty \fIstring\fP (""). Example:
- + .nf
- + \fBprompt\fP "Enter reading mode?" # old prompt is saved
- + ?no return # and old prompt is restored
- + read-skip # changes the prompt
- + \fBprompt\fP "" # so forget old prompt
- .TP
- \fBecho\fP \fIstring\fP
- Display the \fIstring\fP in the prompt line for a short period. Example:
- ***************
- *** 2692,2697 ****
- --- 2851,2861 ----
- cd ~/News
- .fi
- .TP
- + .B Command groups
- + The init file can contain groups of commands which are executed under
- + special conditions. The command groups are described in the section
- + on command groups below.
- + .TP
- .B The news group presentation sequence
- The
- .I last
- ***************
- *** 2702,2707 ****
- --- 2866,2934 ----
- .LP
- Both init files may contain a presentation sequence. In this case,
- the global sequence is \fIappended\fP to the private sequence.
- + .SH COMMAND GROUPS
- + Command groups may only occur in the init file, and they provide a way
- + to have series of commands executed at certain points during news reading.
- + .LP
- + In release 6.3.5, these possibilities are still rather rudimentary, and
- + a mixture of macro syntax and normal init file syntax is used
- + depending on whether the command group is only executed on start-up or
- + several times during the \fInn\fP session.
- + .LP
- + A command group begins with the word \fBon\fP and
- + ends with the word \fBend\fP. The \fBon\fP symbol must followed by
- + one of the following identifiers denoting when the group is executed:
- + .sp 0.5v
- + .nf
- + \fBon\fP ...
- + commands
- + \fBend\fP
- + .fi
- + .sp 0.5v
- + The following command groups may be defined:
- + .TP
- + \fBon slow\fP
- + .br
- + The commands (init file syntax) in the group are executed only if the
- + current terminal output speed is less than or equal to the baud rate
- + set in the \fBslow-speed\fP variable. This can be used to optimize
- + the user-interface for slow terminals by setting suitable variables:
- + .sp 0.5v
- + .nf
- + \fBon slow\fP
- + set slow-mode
- + set delay-redraw
- + unset visible-bell
- + set compress
- + unset header-lines
- + set stop 5
- + set window 10
- + \fBend\fP
- + .fi
- + .TP
- + \fBon fast\fP
- + .br
- + Same as \fBon slow\fP except that the commands are only executed when
- + the terminal is running at a speed above the \fBslow-speed\fP value.
- + .TP
- + \fBon entry\fP
- + .br
- + These commands (macro format!) are executed every time \fInn\fP enters a
- + news group. The `:set' and `:unset' commands at the beginning of the
- + command group are executed \fIbefore\fP \fInn\fP collects the articles
- + in the group, so it is possible to set variables like
- + \fBcross-post\fP. The other commands, and :set/:unset commands that
- + follows a command of another type will be executed immediately
- + \fIafter\fP the first menu page is presented.
- + .sp 0.5v
- + .nf
- + \fBon entry\fP
- + :unset cross-post
- + \fBend\fP
- + .fi
- + .sp 0.5v
- + The `entry' command group is \fInot\fP executed if the group has its
- + own entry action specified in the presentation sequence (see below).
- .SH GROUP PRESENTATION SEQUENCE
- News groups are normally presented in the sequence defined in the
- system-wide
- ***************
- *** 2739,2746 ****
- has not been disabled (as described below).
- .LP
- Each group name may be followed by a file or folder name (must start
- ! with either of / . ~ or +) which will specify the default save file
- ! for that group (and its subgroups). A single "+" following the group
- name is an abbreviation for the last save file name used.
- .LP
- When an article is saved, the default save name will be used as the
- --- 2966,2973 ----
- has not been disabled (as described below).
- .LP
- Each group name may be followed by a file or folder name (must start
- ! with either of `/' `~' or `+') which will specify the default save file
- ! for that group (and its subgroups). A single `+' following the group
- name is an abbreviation for the last save file name used.
- .LP
- When an article is saved, the default save name will be used as the
- ***************
- *** 2748,2757 ****
- therefore does not need to be be a complete file name (unless you use
- the quick save mode).
- .LP
- ! The following meta notation can be used in a sequence file:
- .TP
- group.name
- ! Append the group (and its subgroups) to the presentation sequence list.
- .TP
- \&! group.name
- Completely ignore the group (and its subgroups)
- --- 2975,3040 ----
- therefore does not need to be be a complete file name (unless you use
- the quick save mode).
- .LP
- ! Each group name may also be associated
- ! with a so-called \fBentry action\fP. This is basically an (unnamed)
- ! macro which is invoked on entry to the group (following the same rules
- ! as the `on entry' command group related to :set and :unset commands).
- ! .LP
- ! The entry action begins with a left parenthesis `\fB(\fP' and ends
- ! with a right parenthesis `\fB)\fP' on an otherwise empty line:
- ! .sp 0.5v
- ! .nf
- ! comp.sources. +src/$L/ (
- ! :set cross-post
- ! )
- ! .fi
- ! .sp 0.5v
- ! The last entry action can be repeated by specifying an empty set of
- ! parenthesis, e.g.
- ! .sp 0.5v
- ! comp.unix. +unix ()
- ! .sp 0.5v
- ! The entry action of a preceding group in the sequence can be
- ! associated with the current group(s) by specifying the name of the
- ! group in the parentheses instead of the commands, e.g.
- ! .sp 0.5v
- ! comp.unix. +unix (comp.sources.unix)
- ! .sp 0.5v
- ! A macro can also be associated with the entry action by specifying its
- ! number in the same way as the group name above, e.g.
- ! .sp 0.5v
- ! rec.music. +music (30)
- ! .sp 0.5v
- ! Notice that it is the
- ! \fIcurrent\fP definition of the macro which is associated with the
- ! group, so if the macro is later redefined with the `:define' command,
- ! it will not have any effect on the entry action.
- ! .LP
- ! Group names can be specified using the following notations:
- .TP
- group.name
- ! Append the group (if it exists) to the presentation sequence list. If
- ! \fBalso-subgroups\fP is set (default), all subscribed subgroups of the
- ! group will be included as well (if there are any). Examples: "comp",
- ! "comp.unix", "comp.unix.questions". If the group does not exits (e.g.
- ! "comp"), the subgroups will be included even when \fBalso-subgroups\fP
- ! is not set, i.e. "comp" is equivalent to "comp.".
- ! .TP
- ! group.name.
- ! Append the subgroups of the specified group to the presentation
- ! sequence. The group itself (if it exists) is not included.
- ! Examples: "comp.", "comp.unix.".
- ! .TP
- ! .group.name
- ! Append the groups whose name ends with the specified name to the
- ! sequence. Example: ".test".
- ! .TP
- ! group.name*
- ! Append the group and its subgroups to the presentation sequence list
- ! (even when \fBalso-subgroups\fP is not set). Example: "comp.unix*".
- ! .LP
- ! The following meta notation can be used in a sequence file. The
- ! group.name can be specified using any of the forms described above:
- .TP
- \&! group.name
- Completely ignore the group (and its subgroups)
- *** /usr/storm/nn6.3.4/nn.c Mon Jul 10 13:36:28 1989
- --- nn.c Fri Sep 8 12:46:50 1989
- ***************
- *** 18,23 ****
- --- 18,24 ----
- export int
- article_limit = -1,
- also_read_articles = 0,
- + conf_auto_quit = 0,
- do_kill_handling = 1,
- group_name_args = 0,
- merged_menu = 0,
- ***************
- *** 123,129 ****
- if (enter_admin_mode) {
- if (argc == 1) {
- init_term();
- ! visit_init_file();
- }
- open_master(OPEN_READ);
- visit_active_file();
- --- 124,130 ----
- if (enter_admin_mode) {
- if (argc == 1) {
- init_term();
- ! visit_init_file(0);
- }
- open_master(OPEN_READ);
- visit_active_file();
- ***************
- *** 131,144 ****
- nn_exit(0);
- }
-
- ! if (check_news)
- ! parse_options(argc, argv, (char *)NULL, check_options, "");
- ! else
- if (!emacs_slave_mode) {
- init_term();
-
- if (argc < 2 || strncmp(argv[1], "-I", 2))
- ! visit_init_file();
-
- group_name_args =
- parse_options(argc, argv, (char *)NULL,
- --- 132,147 ----
- nn_exit(0);
- }
-
- ! if (check_news) {
- ! group_name_args =
- ! parse_options(argc, argv, (char *)NULL, check_options, " [group | [+]folder]...");
- ! visit_init_file(1);
- ! } else
- if (!emacs_slave_mode) {
- init_term();
-
- if (argc < 2 || strncmp(argv[1], "-I", 2))
- ! visit_init_file(0);
-
- group_name_args =
- parse_options(argc, argv, (char *)NULL,
- ***************
- *** 172,177 ****
- --- 175,185 ----
-
- visit_rc_file();
-
- + if (group_name_args > 0)
- + named_group_sequence(argv + 1);
- + else
- + normal_group_sequence();
- +
- count_unread_articles(report_group_names);
-
- if (emacs_slave_mode)
- ***************
- *** 207,217 ****
- if (do_kill_handling)
- do_kill_handling = init_kill();
-
- - if (group_name_args > 0)
- - named_group_sequence(argv + 1);
- - else
- - normal_group_sequence();
- -
- if (emacs_slave_mode) {
- emacs_mode();
- goto out;
- --- 215,220 ----
- ***************
- *** 288,293 ****
- --- 291,297 ----
- loop++;
-
- unset_raw();
- + visual_off();
-
- #ifdef NNTP
- nntp_cleanup();
- ***************
- *** 302,323 ****
-
- static read_news(mode)
- {
- ! register group_header *cur, *prev, *tmp;
- int menu_cmd;
- int must_clear = 0, did_jump = 0;
- extern int menu();
-
- prev = group_sequence;
- -
- cur = group_sequence;
- !
- ! while (cur != NULL || did_jump) {
- if (s_hangup) break;
-
- ! if (cur == NULL) {
- ! did_jump = 0;
- ! cur = group_sequence;
- ! continue;
- }
-
- if (!also_read_articles)
- --- 306,346 ----
-
- static read_news(mode)
- {
- ! register group_header *cur, *prev, *tmp, *after_loop;
- int menu_cmd;
- int must_clear = 0, did_jump = 0;
- extern int menu();
-
- prev = group_sequence;
- cur = group_sequence;
- ! after_loop = NULL;
- !
- ! while (cur != NULL || did_jump || conf_auto_quit) {
- if (s_hangup) break;
-
- ! if (mode == 0 && cur == NULL) {
- ! if (after_loop != NULL) {
- ! cur = after_loop;
- ! after_loop = NULL;
- ! cur->last_article = cur->first_article;
- ! continue;
- ! }
- ! if (did_jump) {
- ! did_jump = 0;
- ! cur = group_sequence;
- ! continue;
- ! }
- ! if (!must_clear) return 0;
- ! prompt("\1LAST GROUP READ. QUIT NOW?\1");
- ! switch (yes(1)) {
- ! case 1:
- ! return 1;
- ! case 0:
- ! cur = group_sequence;
- ! default:
- ! after_loop = prev;
- ! continue;
- ! }
- }
-
- if (!also_read_articles)
- ***************
- *** 367,375 ****
- menu_cmd = group_menu(cur, (article_number)(-1),
- match_subject, do_kill_handling, menu);
-
- ! if (menu_cmd != ME_NO_ARTICLES)
- must_clear++;
- !
- switch (menu_cmd) {
-
- case ME_PREV:
- --- 390,400 ----
- menu_cmd = group_menu(cur, (article_number)(-1),
- match_subject, do_kill_handling, menu);
-
- ! if (menu_cmd != ME_NO_ARTICLES) {
- ! after_loop = NULL;
- must_clear++;
- ! }
- !
- switch (menu_cmd) {
-
- case ME_PREV:
- *** /usr/storm/nn6.3.2/nntidy.sh Wed Jun 28 20:08:03 1989
- --- nntidy.sh Fri Sep 8 12:46:51 1989
- ***************
- *** 18,24 ****
- mv rc rc.bak1
-
- {
- ! cat ${ACTIVE}
- echo EOA
- cat rc.bak1
-
- --- 18,24 ----
- mv rc rc.bak1
-
- {
- ! cat ${2-$ACTIVE}
- echo EOA
- cat rc.bak1
-
- *** /usr/storm/nn6.3.2/nntp.c Wed Jun 28 20:08:04 1989
- --- nntp.c Fri Sep 8 12:46:51 1989
- ***************
- *** 6,12 ****
- *
- * Rene' Seindal (seindal@diku.dk) Thu Dec 1 18:41:23 1988
- *
- ! * Last change: Tue May 23 18:38:49 1989
- */
-
-
- --- 6,12 ----
- *
- * Rene' Seindal (seindal@diku.dk) Thu Dec 1 18:41:23 1988
- *
- ! * Last change: Fri Jul 7 18:56:00 1989
- */
-
-
- ***************
- *** 22,29 ****
- #define NNTPCACHE 10
- #endif
-
- - #undef DEBUG
- -
- #ifdef NNTP
- #include <stdio.h>
- #include "nntp.h"
- --- 22,27 ----
- ***************
- *** 32,59 ****
- #include <netdb.h>
-
- /* This is necessary due to the definitions in m-XXX.h */
- ! #ifndef NETWORK_DATABASE
- ! #include <netinet/in.h>
- ! #else
- ! #ifdef NETWORK_BYTE_ORDER
- #include <netinet/in.h>
- #endif
- - #endif
-
- export char nntp_server[256]; /* name of nntp server */
- export int use_nntp = 0; /* bool: t iff we use nntp */
- ! export int nntp_failed = 0; /* bool: t iff connection is broken */
- ! /* in nntp_get_article() or nntp_get_active() */
- import int silent;
- import char news_active[];
-
- ! extern int errno, sys_nerr;
- ! extern char *sys_errlist[];
-
- #define syserr() (errno >= 0 && errno < sys_nerr ? \
- ! sys_errlist[errno] : "Illegal error.")
-
- ! extern char *mktemp();
-
- static FILE *nntp_in = NULL; /* fp for reading from server */
- static FILE *nntp_out = NULL; /* fp for writing to server */
- --- 30,54 ----
- #include <netdb.h>
-
- /* This is necessary due to the definitions in m-XXX.h */
- ! #if !defined(NETWORK_DATABASE) || defined(NETWORK_BYTE_ORDER)
- #include <netinet/in.h>
- #endif
-
- export char nntp_server[256]; /* name of nntp server */
- export int use_nntp = 0; /* bool: t iff we use nntp */
- ! export int nntp_failed = 0; /* bool: t iff connection is broken
- ! in nntp_get_article() or nntp_get_active() */
- !
- import int silent;
- import char news_active[];
-
- ! import int errno, sys_nerr;
- ! import char *sys_errlist[];
-
- #define syserr() (errno >= 0 && errno < sys_nerr ? \
- ! sys_errlist[errno] : "Unknown error.")
-
- ! import char *mktemp();
-
- static FILE *nntp_in = NULL; /* fp for reading from server */
- static FILE *nntp_out = NULL; /* fp for writing to server */
- ***************
- *** 60,74 ****
- static int is_connected = 0; /* bool: t iff we are connected */
- static group_header *group_hd; /* ptr to servers current group */
- static int is_set = 0; /* bool: t iff group_hd is set */
-
- ! #define ERROR_LEVEL 400 /* All codes below are not errors */
-
-
- /*
- * nntp_find_server: Find out which host to use as NNTP server.
- *
- ! * This is done by consulting the file NNTP_SERVER (defined in config.h).
- ! * Set nntp_server[] to the host's name.
- */
-
- void nntp_find_server()
- --- 55,96 ----
- static int is_connected = 0; /* bool: t iff we are connected */
- static group_header *group_hd; /* ptr to servers current group */
- static int is_set = 0; /* bool: t iff group_hd is set */
- + static int try_again = 0; /* bool: t if timeout forces retry */
- + static int can_post = 0; /* bool: t iff NNTP server accepts postings */
- +
- + #define ERR_TIMEOUT 503 /* Response code for timeout */
- +
- + #ifdef DEBUG
- + static FILE *nntp_debug;
-
- ! /*
- ! * nntp_debug_msg: print a debug message.
- ! *
- ! * The master appends prefix and str to a log file, and clients
- ! * prints it as a message.
- ! */
-
- + nntp_debug_msg(prefix, str)
- + char *prefix, *str;
- + {
- + if (is_master) {
- + if (nntp_debug != 0) {
- + fprintf(nntp_debug, "%s %s\n", prefix, str);
- + fflush(nntp_debug);
- + }
- + } else {
- + msg("%s %s", prefix, str);
- + fl;
- + sleep();
- + }
- + }
- + #endif
-
- /*
- * nntp_find_server: Find out which host to use as NNTP server.
- *
- ! * This is done by consulting the file NNTP_SERVER (defined in
- ! * config.h). Set nntp_server[] to the host's name.
- */
-
- void nntp_find_server()
- ***************
- *** 78,86 ****
- FILE *fp;
-
- /*
- ! * This feature cannot normally be enabled, because the data base
- ! * and the users rc file contains references to articles by number,
- ! * which is not unique across NNTP servers.
- */
- #ifdef DEBUG
- if ((cp = getenv("NNTPSERVER")) != NULL) {
- --- 100,108 ----
- FILE *fp;
-
- /*
- ! * This feature cannot normally be enabled, because the database and
- ! * the users rc file contains references to articles by number, and
- ! * these numbers are not unique across NNTP servers.
- */
- #ifdef DEBUG
- if ((cp = getenv("NNTPSERVER")) != NULL) {
- ***************
- *** 88,98 ****
- return;
- }
- #endif /* DEBUG */
- !
- name = NNTP_SERVER;
- if (*name != '/')
- name = relative(lib_directory, name);
- !
- if ((fp = open_file(name, OPEN_READ)) != NULL) {
- while (fgets(buf, sizeof buf, fp) != 0) {
- if (*buf == '#' || *buf == '\n')
- --- 110,120 ----
- return;
- }
- #endif /* DEBUG */
- !
- name = NNTP_SERVER;
- if (*name != '/')
- name = relative(lib_directory, name);
- !
- if ((fp = open_file(name, OPEN_READ)) != NULL) {
- while (fgets(buf, sizeof buf, fp) != 0) {
- if (*buf == '#' || *buf == '\n')
- ***************
- *** 108,114 ****
-
- if (!is_master)
- printf("\nCannot find name of NNTP server.\nCheck %s\n", name);
- !
- sys_error("Failed to find name of NNTP server!");
- }
-
- --- 130,136 ----
-
- if (!is_master)
- printf("\nCannot find name of NNTP server.\nCheck %s\n", name);
- !
- sys_error("Failed to find name of NNTP server!");
- }
-
- ***************
- *** 124,134 ****
- {
- char host[128];
- char *cp;
- !
- nntp_find_server();
- gethostname(host, sizeof host);
- use_nntp = strcmp(host, nntp_server) != 0; /* too simplistic ??? */
- !
- if (use_nntp)
- strcpy(news_active, relative(db_directory, "ACTIVE"));
- else
- --- 146,156 ----
- {
- char host[128];
- char *cp;
- !
- nntp_find_server();
- gethostname(host, sizeof host);
- use_nntp = strcmp(host, nntp_server) != 0; /* too simplistic ??? */
- !
- if (use_nntp)
- strcpy(news_active, relative(db_directory, "ACTIVE"));
- else
- ***************
- *** 148,165 ****
- int sockt_rd, sockt_wr;
- int response;
- char line[NNTP_STRLEN];
- !
- ! if (!is_master && !silent) {
- ! printf("\rConnecting to NNTP server %s ... ", nntp_server);
- ! fl;
- ! }
- nntp_failed = 1;
- is_connected = 0;
-
- sockt_rd = nntp_get_socket();
- if (sockt_rd < 0)
- ! return -1;
- !
- if ((nntp_in = fdopen(sockt_rd, "r")) == NULL) {
- close(sockt_rd);
- return -1;
- --- 170,197 ----
- int sockt_rd, sockt_wr;
- int response;
- char line[NNTP_STRLEN];
- !
- ! if (!is_master && !silent)
- ! msg("Connecting to NNTP server %s ... ", nntp_server);
- !
- nntp_failed = 1;
- is_connected = 0;
-
- + #ifdef DEBUG
- + if (is_master) {
- + if (nntp_debug != 0) {
- + fclose(nntp_debug);
- + rename("/usr/tmp/nnmaster.log", "/usr/tmp/nnmaster.prev");
- + }
- + nntp_debug = fopen("/usr/tmp/nnmaster.log", "a");
- + } else
- + nntp_debug = 0;
- + #endif
- +
- sockt_rd = nntp_get_socket();
- if (sockt_rd < 0)
- ! return -1;
- !
- if ((nntp_in = fdopen(sockt_rd, "r")) == NULL) {
- close(sockt_rd);
- return -1;
- ***************
- *** 171,198 ****
- nntp_in = NULL; /* from above */
- return -1;
- }
- !
- /* Now get the server's signon message */
- response = nntp_get_server(line, sizeof(line));
- ! if (response < 0 || response >= ERROR_LEVEL) {
- ! if (!is_master) {
- ! user_error("Failed to connect to NNTP server.\n%s",
- ! response >= ERROR_LEVEL ? line : syserr());
- ! /* NOTREACHED */
- ! } else {
- ! log_entry('N', "Failed to connect to NNTP server.\n%s",
- ! response >= ERROR_LEVEL ? line : syserr());
- fclose(nntp_out);
- fclose(nntp_in);
- return -1;
- }
- ! }
- ! if (!is_master && !silent) {
- ! fputs("ok.\r", stdout);
- ! fl;
- }
- is_connected = 1;
- nntp_failed = 0;
- return 0;
- }
-
- --- 203,241 ----
- nntp_in = NULL; /* from above */
- return -1;
- }
- !
- /* Now get the server's signon message */
- response = nntp_get_server(line, sizeof(line));
- !
- ! if (is_master) {
- ! if (response != OK_CANPOST && response != OK_NOPOST) {
- ! log_entry('N', "Failed to connect to NNTP server");
- ! log_entry('N', "Response: %s", line);
- fclose(nntp_out);
- fclose(nntp_in);
- return -1;
- }
- ! } else {
- ! switch (response) {
- ! case OK_CANPOST:
- ! can_post = 1;
- ! break;
- ! case OK_NOPOST:
- ! can_post = 0;
- ! break;
- ! default:
- ! user_error(line);
- ! /* NOTREACHED */
- ! }
- }
- + if (!is_master && !silent)
- + msg("Connecting to NNTP server %s ... ok (%s)",
- + nntp_server, can_post ? "posting is allowed" : "no posting");
- +
- is_connected = 1;
- + is_set = 0;
- nntp_failed = 0;
- + try_again = 0;
- return 0;
- }
-
- ***************
- *** 213,243 ****
- register char **cp;
- #endif
- int (*errfct)() = is_master ? sys_error : user_error;
- !
- if ((sp = getservbyname("nntp", "tcp")) == NULL)
- (*errfct)("nntp/tcp: Unknown service.\n");
- !
- if ((hp = gethostbyname(nntp_server)) == NULL)
- (*errfct)("NNTP server %s unknown.\n", nntp_server);
- !
- bzero((char *) &sin, sizeof(sin));
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = sp->s_port;
- !
- #ifdef h_addr
- /* get a socket and initiate connection -- use multiple addresses */
- !
- for (cp = hp->h_addr_list; cp && *cp; cp++) {
- s = socket(hp->h_addrtype, SOCK_STREAM, 0);
- if (s < 0)
- (*errfct)("Can't get NNTP socket: %s\n", syserr());
- bcopy(*cp, (char *)&sin.sin_addr, hp->h_length);
- !
- x = connect(s, (struct sockaddr *)&sin, sizeof (sin));
- if (x == 0)
- break;
- if (!is_master)
- ! msg("Connecting to %s: %s", nntp_server, syserr());
- (void) close(s);
- s = -1;
- }
- --- 256,286 ----
- register char **cp;
- #endif
- int (*errfct)() = is_master ? sys_error : user_error;
- !
- if ((sp = getservbyname("nntp", "tcp")) == NULL)
- (*errfct)("nntp/tcp: Unknown service.\n");
- !
- if ((hp = gethostbyname(nntp_server)) == NULL)
- (*errfct)("NNTP server %s unknown.\n", nntp_server);
- !
- bzero((char *) &sin, sizeof(sin));
- sin.sin_family = hp->h_addrtype;
- sin.sin_port = sp->s_port;
- !
- #ifdef h_addr
- /* get a socket and initiate connection -- use multiple addresses */
- !
- for (cp = hp->h_addr_list; cp && *cp; cp++) {
- s = socket(hp->h_addrtype, SOCK_STREAM, 0);
- if (s < 0)
- (*errfct)("Can't get NNTP socket: %s\n", syserr());
- bcopy(*cp, (char *)&sin.sin_addr, hp->h_length);
- !
- x = connect(s, (struct sockaddr *)&sin, sizeof (sin));
- if (x == 0)
- break;
- if (!is_master)
- ! msg("Connecting to %s failed: %s", nntp_server, syserr());
- (void) close(s);
- s = -1;
- }
- ***************
- *** 246,260 ****
- #else /* no name server */
- if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0)
- (*errfct)("Can't get NNTP socket: %s\n", syserr());
- !
- /* And then connect */
- bcopy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length);
- if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
- if (is_master)
- ! (*errfct)("Connecting to %s: %s", nntp_server, syserr());
- s = -1;
- }
- -
- #endif
- return s;
- }
- --- 289,302 ----
- #else /* no name server */
- if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0)
- (*errfct)("Can't get NNTP socket: %s\n", syserr());
- !
- /* And then connect */
- bcopy(hp->h_addr, (char *) &sin.sin_addr, hp->h_length);
- if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
- if (is_master)
- ! (*errfct)("Connecting to %s failed: %s", nntp_server, syserr());
- s = -1;
- }
- #endif
- return s;
- }
- ***************
- *** 266,279 ****
- */
-
- nntp_put_server(string)
- ! char *string;
- {
- #ifdef DEBUG
- ! msg(">>> %s", string);
- #endif
- fprintf(nntp_out, "%s\r\n", string);
- if (fflush(nntp_out) == EOF) {
- ! nntp_error();
- return -1;
- }
- return 0;
- --- 308,321 ----
- */
-
- nntp_put_server(string)
- ! char *string;
- {
- #ifdef DEBUG
- ! nntp_debug_msg(">>>", string);
- #endif
- fprintf(nntp_out, "%s\r\n", string);
- if (fflush(nntp_out) == EOF) {
- ! nntp_io_error();
- return -1;
- }
- return 0;
- ***************
- *** 282,299 ****
- /*
- * nntp_get_server_line: get a line from the server.
- *
- ! * Expects to be connected to the server.
- ! * The line can be any kind of line i.e., either response or text.
- */
-
- nntp_get_server_line(string, size)
- ! char *string;
- ! int size;
- {
- register char *cp, *nl;
- !
- if (fgets(string, size, nntp_in) == NULL) {
- ! nntp_error();
- return -1;
- }
- for (cp = string, nl = NULL; *cp != NUL; cp++) {
- --- 324,341 ----
- /*
- * nntp_get_server_line: get a line from the server.
- *
- ! * Expects to be connected to the server.
- ! * The line can be any kind of line, i.e., either response or text.
- */
-
- nntp_get_server_line(string, size)
- ! char *string;
- ! int size;
- {
- register char *cp, *nl;
- !
- if (fgets(string, size, nntp_in) == NULL) {
- ! nntp_io_error();
- return -1;
- }
- for (cp = string, nl = NULL; *cp != NUL; cp++) {
- ***************
- *** 305,311 ****
- nl = cp;
- }
- if (nl != NULL) *nl = NUL;
- !
- return 0;
- }
-
- --- 347,353 ----
- nl = cp;
- }
- if (nl != NULL) *nl = NUL;
- !
- return 0;
- }
-
- ***************
- *** 313,331 ****
- * nntp_get_server: get a response line from the server.
- *
- * Expects to be connected to the server.
- ! * The numerical value of the response is returned.
- */
-
- nntp_get_server(string, size)
- ! char *string;
- ! int size;
- {
- if (nntp_get_server_line(string, size) < 0)
- return -1;
- return isdigit(*string) ? atoi(string) : 0;
- }
-
- /*
- * nntp_close_server: close the connection to the server.
- */
-
- --- 355,422 ----
- * nntp_get_server: get a response line from the server.
- *
- * Expects to be connected to the server.
- ! * Returns the numerical value of the reponse, or -1 in case of errors.
- */
-
- nntp_get_server(string, size)
- ! char *string;
- ! int size;
- {
- if (nntp_get_server_line(string, size) < 0)
- return -1;
- + #ifdef DEBUG
- + nntp_debug_msg("<<<", string);
- + #endif
- return isdigit(*string) ? atoi(string) : 0;
- }
-
- /*
- + * nntp_ask_server: ask the server a question and return the answer.
- + *
- + * Expects to be connected to the server.
- + * Returns the numerical value of the reponse, or -1 in case of
- + * errors.
- + * Contains some code to handle server timeouts intelligently.
- + */
- +
- + nntp_ask_server(string, size)
- + char *string;
- + int size;
- + {
- + int response;
- +
- + if (nntp_put_server(string) < 0)
- + return -1;
- + response = nntp_get_server(string, size);
- +
- + /*
- + * Handle the response from the server. Responses are handled as
- + * followes:
- + *
- + * 100-199 Informational. Passed back. (should they be ignored?).
- + * 200-299 Ok messages. Passed back.
- + * 300-399 Ok and proceed. Can not happen in nn.
- + * 400-499 Errors (no article, etc). Passed up and handled there.
- + * 500-599 Fatal NNTP errors. Handled below.
- + */
- + if (response == ERR_GOODBYE || response > ERR_COMMAND) {
- + nntp_failed = 1;
- + nntp_close_server();
- +
- + if (response != ERR_TIMEOUT) { /* if not timeout, complain */
- + if (is_master)
- + sys_error("NNTP botch: internal error: %s", string);
- + else
- + user_error("NNTP botch: internal error: %s", string);
- + /* NOTREACHED */
- + }
- + try_again = 1;
- + is_set = 0;
- + }
- + return response;
- + }
- +
- + /*
- * nntp_close_server: close the connection to the server.
- */
-
- ***************
- *** 333,381 ****
- {
- if (!is_connected)
- return;
- !
- if (!nntp_failed) { /* avoid infinite recursion */
- char line[NNTP_STRLEN];
- !
- ! (void) nntp_put_server("QUIT");
- ! (void) nntp_get_server(line, sizeof line);
- }
- !
- (void) fclose(nntp_out);
- (void) fclose(nntp_in);
- !
- is_connected = 0;
- }
-
- /*
- ! * nntp_ask_server: ask the server a question and return the answer.
- ! *
- ! * Expects to be connected to the server.
- ! * Returns the numerical value of the reponse, or -1 in case of errors.
- ! */
- !
- ! nntp_ask_server(string, size)
- ! char *string;
- ! int size;
- ! {
- ! if (nntp_put_server(string) < 0 || nntp_get_server(string, size) < 0)
- ! return -1;
- ! #ifdef DEBUG
- ! msg("<<< %.75s", string);
- ! #endif
- ! return isdigit(*string) ? atoi(string) : 0;
- ! }
- !
- ! /*
- ! * nntp_error: signal an error in talking to the server.
- *
- ! * An nn client terminates a session with the user.
- ! * The master simply closes the connection, which is probably
- ! * inadequate. nntp_failed is set, for use by the master to
- ! * terminate collection.
- */
-
- ! nntp_error()
- {
- nntp_failed = 1;
- if (is_master) {
- --- 424,459 ----
- {
- if (!is_connected)
- return;
- !
- if (!nntp_failed) { /* avoid infinite recursion */
- char line[NNTP_STRLEN];
- ! int n;
- !
- ! strcpy(line, "QUIT");
- ! n = nntp_ask_server(line, sizeof line);
- ! if (n != OK_GOODBYE)
- ! ; /* WHAT NOW ??? */
- }
- !
- (void) fclose(nntp_out);
- (void) fclose(nntp_in);
- !
- is_connected = 0;
- }
-
- /*
- ! * nntp_io_error: signal an I/O error in talking to the server.
- *
- ! * An nn client terminates a session with the user. The master
- ! * simply closes the connection. The flag nntp_failed is set, for
- ! * use by the master to terminate collection.
- ! *
- ! * BUG: if the nntp server is forcibly killed, errno can contain a
- ! * bogus value, resulting in strange error messages. It is
- ! * probably better just to write out the numerical value of errno.
- */
-
- ! nntp_io_error()
- {
- nntp_failed = 1;
- if (is_master) {
- ***************
- *** 384,397 ****
- nntp_close_server();
- }
- } else {
- ! #ifdef DEBUG
- ! printf("Can't talk to NNTP server %s: %s", nntp_server, syserr());
- ! abort();
- ! #else
- ! user_error("Can't talk to NNTP server %s: %s", nntp_server, syserr());
- ! #endif
- }
- }
-
- /*
- * nntp_copy_text: copy text response into file.
- --- 462,487 ----
- nntp_close_server();
- }
- } else {
- ! user_error("Lost connection to NNTP server %s: %s", nntp_server, syserr());
- ! /* NOTREACHED */
- ! }
- ! }
- !
- ! /*
- ! * nntp_no_post: Check to see whether posting is allowed.
- ! */
- !
- ! nntp_no_post()
- ! {
- ! if (!is_connected && nntp_server_init() < 0)
- ! return 1; /* If we cannot connect, neither can inews */
- ! if (can_post == 0) {
- ! msg("NNTP server does not allow postings from this host. Sorry!");
- ! return 1;
- }
- + return 0;
- }
- +
-
- /*
- * nntp_copy_text: copy text response into file.
- ***************
- *** 398,421 ****
- *
- * Sends COMMAND to the server, and copies the following text response
- * into an open file.
- ! * Return -1 on error, 0 otherwise.
- */
-
- ! nntp_copy_text(fp, command)
- ! FILE *fp;
- ! char *command;
- {
- char buf[NNTP_STRLEN];
- char *cp;
- int n, nlines;
- !
- strcpy(buf, command);
- if ((n = nntp_ask_server(buf, sizeof buf)) < 0) {
- return -1;
- }
- ! if (n >= ERROR_LEVEL)
- return -1;
- !
- nlines = 0;
- while ((n = nntp_get_server_line(buf, sizeof buf)) >= 0) {
- cp = buf;
- --- 488,513 ----
- *
- * Sends COMMAND to the server, and copies the following text response
- * into an open file.
- ! * Return -1 on error, 0 otherwise. It is treated as an error, if
- ! * the returned response it not what was expected.
- */
-
- ! nntp_copy_text(fp, command, expected)
- ! FILE *fp;
- ! char *command;
- ! int expected;
- {
- char buf[NNTP_STRLEN];
- char *cp;
- int n, nlines;
- !
- strcpy(buf, command);
- if ((n = nntp_ask_server(buf, sizeof buf)) < 0) {
- return -1;
- }
- ! if (n != expected)
- return -1;
- !
- nlines = 0;
- while ((n = nntp_get_server_line(buf, sizeof buf)) >= 0) {
- cp = buf;
- ***************
- *** 447,467 ****
- char bufo[NNTP_STRLEN], bufn[NNTP_STRLEN];
- char *new_name;
- int same;
- !
- if (!is_master)
- return access(news_active, 4);
- -
- - if (!is_connected && nntp_server_init() < 0)
- - return -1;
-
- new_name = mktemp(relative(db_directory, ".actXXXXXX"));
- !
- if ((new = fopen(new_name, "w+")) == NULL)
- return -1;
- ! if (nntp_copy_text(new, "list") < 0) {
- fclose(new);
- unlink(new_name);
- ! return -1;
- }
- rewind(new);
- same = 0;
- --- 539,563 ----
- char bufo[NNTP_STRLEN], bufn[NNTP_STRLEN];
- char *new_name;
- int same;
- !
- if (!is_master)
- return access(news_active, 4);
-
- + again:
- + if (!is_connected && nntp_server_init() < 0)
- + return -1;
- +
- new_name = mktemp(relative(db_directory, ".actXXXXXX"));
- !
- if ((new = fopen(new_name, "w+")) == NULL)
- return -1;
- ! if (nntp_copy_text(new, "LIST", OK_GROUPS) < 0) {
- fclose(new);
- unlink(new_name);
- ! if (try_again) /* Handle nntp server timeouts */
- ! goto again;
- ! else
- ! return -1;
- }
- rewind(new);
- same = 0;
- ***************
- *** 474,486 ****
- fclose(old);
- }
- fclose(new);
- !
- if (same)
- unlink(new_name);
- else
- if (rename(new_name, news_active) != 0)
- sys_error("Cannot rename %s to %s", new_name, news_active);
- !
- return 0;
- }
-
- --- 570,582 ----
- fclose(old);
- }
- fclose(new);
- !
- if (same)
- unlink(new_name);
- else
- if (rename(new_name, news_active) != 0)
- sys_error("Cannot rename %s to %s", new_name, news_active);
- !
- return 0;
- }
-
- ***************
- *** 507,518 ****
- */
-
- struct cache *nntp_search_cache(art, gh)
- ! article_number art;
- ! group_header *gh;
- {
- struct cache *cptr = cache;
- int i;
- !
- for (i = 0; i < NNTPCACHE; i++, cptr++)
- if (cptr->art == art && cptr->grp == gh) {
- cptr->time = cur_time++;
- --- 603,614 ----
- */
-
- struct cache *nntp_search_cache(art, gh)
- ! article_number art;
- ! group_header *gh;
- {
- struct cache *cptr = cache;
- int i;
- !
- for (i = 0; i < NNTPCACHE; i++, cptr++)
- if (cptr->art == art && cptr->grp == gh) {
- cptr->time = cur_time++;
- ***************
- *** 535,541 ****
- int i, lru;
- unsigned min_time = cur_time;
- char name[24];
- !
- for (i = 0; i < NNTPCACHE; i++, cptr++)
- if (min_time > cptr->time) {
- min_time = cptr->time;
- --- 631,637 ----
- int i, lru;
- unsigned min_time = cur_time;
- char name[24];
- !
- for (i = 0; i < NNTPCACHE; i++, cptr++)
- if (min_time > cptr->time) {
- min_time = cptr->time;
- ***************
- *** 542,548 ****
- lru = i;
- }
- cptr = &cache[lru];
- !
- if (cptr->file_name) {
- unlink(cptr->file_name);
- free(cptr->file_name);
- --- 638,644 ----
- lru = i;
- }
- cptr = &cache[lru];
- !
- if (cptr->file_name) {
- unlink(cptr->file_name);
- free(cptr->file_name);
- ***************
- *** 552,560 ****
- copy_str(relative(is_master ? lib_directory : nn_directory,
- mktemp(name)));
- cptr->time = cur_time++;
- - #ifdef DEBUG
- - msg("cache: select slot %d, file name %s", lru, cptr->file_name);
- - #endif
- return cptr;
- }
-
- --- 648,653 ----
- ***************
- *** 568,574 ****
- {
- struct cache *cptr = cache;
- int i;
- !
- for (i = 0; i < NNTPCACHE; i++, cptr++)
- if (cptr->file_name)
- unlink(cptr->file_name);
- --- 661,667 ----
- {
- struct cache *cptr = cache;
- int i;
- !
- for (i = 0; i < NNTPCACHE; i++, cptr++)
- if (cptr->file_name)
- unlink(cptr->file_name);
- ***************
- *** 582,588 ****
- */
-
- nntp_set_group(gh)
- ! group_header *gh;
- {
- group_hd = gh;
- is_set = 0;
- --- 675,681 ----
- */
-
- nntp_set_group(gh)
- ! group_header *gh;
- {
- group_hd = gh;
- is_set = 0;
- ***************
- *** 599,611 ****
- */
-
- FILE *nntp_get_article(article)
- ! article_number article;
- {
- char buf[NNTP_STRLEN];
- FILE *tmp;
- struct cache *cptr;
- int n;
- !
- if (!is_connected && nntp_server_init() < 0) {
- return NULL;
- }
- --- 692,705 ----
- */
-
- FILE *nntp_get_article(article)
- ! article_number article;
- {
- char buf[NNTP_STRLEN];
- FILE *tmp;
- struct cache *cptr;
- int n;
- !
- ! again:
- if (!is_connected && nntp_server_init() < 0) {
- return NULL;
- }
- ***************
- *** 614,629 ****
- * Set the server group to the current group
- */
- if (is_set == 0) {
- ! sprintf(buf, "group %s", group_hd->group_name);
- ! if ((n = nntp_ask_server(buf, sizeof buf)) < 0){
- return NULL;
- }
- ! if (n >= ERROR_LEVEL)
- ! return NULL;
- is_set = 1;
- }
- /*
- ! * Search the cache for the requested article,and allocate a new
- * slot if necessary.
- */
- cptr = nntp_search_cache(article, group_hd);
- --- 708,727 ----
- * Set the server group to the current group
- */
- if (is_set == 0) {
- ! sprintf(buf, "GROUP %s", group_hd->group_name);
- ! if ((n = nntp_ask_server(buf, sizeof buf)) < 0) {
- return NULL;
- }
- ! if (n != OK_GROUP) {
- ! if (try_again)
- ! goto again; /* Handle nntp server timeouts */
- ! else
- ! return NULL;
- ! }
- is_set = 1;
- }
- /*
- ! * Search the cache for the requested article, and allocate a new
- * slot if necessary.
- */
- cptr = nntp_search_cache(article, group_hd);
- ***************
- *** 631,647 ****
- return open_file(cptr->file_name, OPEN_READ);
- }
- cptr = nntp_new_slot();
- !
- if ((tmp = open_file(cptr->file_name, OPEN_CREATE)) == NULL)
- return NULL;
- !
- /*
- * Copy the article.
- */
- ! sprintf(buf, "article %d", article);
- ! if (nntp_copy_text(tmp, buf) < 0) {
- fclose(tmp);
- ! return NULL;
- }
- fclose(tmp);
- if ((tmp = open_file(cptr->file_name, OPEN_READ)) != NULL) {
- --- 729,748 ----
- return open_file(cptr->file_name, OPEN_READ);
- }
- cptr = nntp_new_slot();
- !
- if ((tmp = open_file(cptr->file_name, OPEN_CREATE)) == NULL)
- return NULL;
- !
- /*
- * Copy the article.
- */
- ! sprintf(buf, "ARTICLE %d", article);
- ! if (nntp_copy_text(tmp, buf, OK_ARTICLE) < 0) {
- fclose(tmp);
- ! if (try_again)
- ! goto again; /* Handle nntp server timeouts */
- ! else
- ! return NULL;
- }
- fclose(tmp);
- if ((tmp = open_file(cptr->file_name, OPEN_READ)) != NULL) {
- *** /usr/storm/nn6.3.2/nnusage.sh Wed Jun 28 20:08:06 1989
- --- nnusage.sh Fri Sep 8 12:46:52 1989
- ***************
- *** 1,7 ****
- # CONFIG file is inserted here
-
- if [ x"$1" = x'-t' ] ; then
- ! SORTMODE="+1r"
- else
- SORTMODE=""
- fi
- --- 1,7 ----
- # CONFIG file is inserted here
-
- if [ x"$1" = x'-t' ] ; then
- ! SORTMODE="+1nr"
- else
- SORTMODE=""
- fi
- *** /usr/storm/nn6.3.6/pack_name.c Mon Sep 18 17:00:48 1989
- --- pack_name.c Fri Sep 8 12:46:52 1989
- ***************
- *** 183,189 ****
- return 0;
-
- p = source, q = namebuf, n = 0;
- - maxq = namebuf + sizeof namebuf - 1;
-
- new_partition:
- for (i = SEP_MAXIMUM; --i >= 0; separator[i] = NULL);
- --- 183,188 ----
- ***************
- *** 212,218 ****
- continue;
- }
- if (n > 1) continue;
- - if (q >= maxq) break;
- *q++ = c;
- if (IS_SEPARATOR(c)) {
- switch (sep = (Class[c] & 0xff)) {
- --- 211,216 ----
- *** /usr/storm/nn6.3.6/patchlevel.h Mon Sep 18 17:16:13 1989
- --- patchlevel.h Fri Sep 8 12:46:52 1989
- ***************
- *** 13,20 ****
- * 1989-06-30: Patch 3: several files
- * 1989-07-10: Patch 4: several files
- * 1989-08-22: Patch 5: db.c
- ! * 1989-08-25: Patch 6: admin.c pack_date.c pack_name.c ...
- */
-
- ! #define PATCHLEVEL 6
-
- --- 13,21 ----
- * 1989-06-30: Patch 3: several files
- * 1989-07-10: Patch 4: several files
- * 1989-08-22: Patch 5: db.c
- ! * 1989-08-25: Patch 6: admin.c pack_date.c
- ! * 1989-09-08: Patch 7: several files
- */
-
- ! #define PATCHLEVEL 7
-
- *** /usr/storm/nn6.3.6/rc.c Mon Sep 18 17:03:22 1989
- --- rc.c Fri Sep 8 12:46:54 1989
- ***************
- *** 187,193 ****
-
- gh->last_article = LASTART(line);
-
- ! if (gh->group_flag & G_BLOCKED) {
- /* We cannot trust this group, so we leave it alone */
- /* group_menu after update_group will do what is necessary */
- continue;
- --- 187,193 ----
-
- gh->last_article = LASTART(line);
-
- ! if (gh->group_flag & (G_BLOCKED | G_NO_DIRECTORY)) {
- /* We cannot trust this group, so we leave it alone */
- /* group_menu after update_group will do what is necessary */
- continue;
- ***************
- *** 367,376 ****
- unread_articles = 0;
- unread_groups = 0;
-
- ! Loop_Groups_Header(gh) {
- gh->group_flag &= ~G_UNREAD_COUNT;
-
- if ((gh->group_flag & G_SUBSCRIPTION) == 0) continue;
-
- if (gh->last_l_article > gh->last_article) {
- n = unread_articles;
- --- 367,377 ----
- unread_articles = 0;
- unread_groups = 0;
-
- ! Loop_Groups_Sequence(gh) {
- gh->group_flag &= ~G_UNREAD_COUNT;
-
- if ((gh->group_flag & G_SUBSCRIPTION) == 0) continue;
- + if (gh->group_flag & G_NO_DIRECTORY) continue;
-
- if (gh->last_l_article > gh->last_article) {
- n = unread_articles;
- *** /usr/storm/nn6.3.4/s-aux1-1.h Mon Jul 10 14:47:39 1989
- --- s-aux1-1.h Fri Sep 8 12:46:56 1989
- ***************
- *** 94,99 ****
- --- 94,106 ----
- #define HAVE_UNAME /* System V */
-
- /*
- + * Define HAVE_MULTIGROUP if system has simultaneous multiple group
- + * membership capability (BSD style).
- + */
- +
- + #define HAVE_MULTIGROUP
- +
- + /*
- * Define DETATCH_TERMINAL to be a command sequence which
- * will detatch a process from the control terminal
- * Also include files needed to perform this HERE.
- *** /usr/storm/nn6.3.0/s-bsd4-2.h Thu Jun 1 11:11:01 1989
- --- s-bsd4-2.h Fri Sep 8 12:46:56 1989
- ***************
- *** 90,95 ****
- --- 90,102 ----
- #define HAVE_GETHOSTNAME /* BSD systems */
-
- /*
- + * Define HAVE_MULTIGROUP if system has simultaneous multiple group
- + * membership capability (BSD style).
- + */
- +
- + #define HAVE_MULTIGROUP
- +
- + /*
- * Define DETATCH_TERMINAL to be a command sequence which
- * will detatch a process from the control terminal
- * Also include system files needed to perform this HERE.
- *** /usr/storm/nn6.3.0/s-bsd4-3.h Thu Jun 1 11:11:01 1989
- --- s-bsd4-3.h Fri Sep 8 12:46:56 1989
- ***************
- *** 96,101 ****
- --- 96,114 ----
- #define HAVE_GETHOSTNAME /* BSD systems */
-
- /*
- + * Define HAVE_MULTIGROUP if system has simultaneous multiple group
- + * membership capability (BSD style).
- + *
- + * Also define GIDSET_TYPE to the type of the elements in the array
- + * initialized by getgroups() if different from "int" (many systems
- + * have a gid_t, but very few use it for getgroups()).
- + */
- +
- + #define HAVE_MULTIGROUP
- +
- + /* #define GIDSET_TYPE gid_t /* Newer 4.3 systems may use this */
- +
- + /*
- * Define DETATCH_TERMINAL to be a command sequence which
- * will detatch a process from the control terminal
- * Also include system files needed to perform this HERE.
- *** /usr/storm/nn6.3.0/s-sunos3.h Thu Jun 1 11:11:01 1989
- --- s-sunos3.h Fri Sep 8 12:46:58 1989
- ***************
- *** 97,102 ****
- --- 97,109 ----
- #define HAVE_GETHOSTNAME /* BSD systems */
-
- /*
- + * Define HAVE_MULTIGROUP if system has simultaneous multiple group
- + * membership capability (BSD style).
- + */
- +
- + #define HAVE_MULTIGROUP
- +
- + /*
- * Define DETATCH_TERMINAL to be a command sequence which
- * will detatch a process from the control terminal
- * Also include system files needed to perform this HERE.
- *** /usr/storm/nn6.3.0/s-sunos4-0.h Thu Jun 1 11:11:01 1989
- --- s-sunos4-0.h Fri Sep 8 12:46:58 1989
- ***************
- *** 97,102 ****
- --- 97,109 ----
- #define HAVE_GETHOSTNAME /* BSD systems */
-
- /*
- + * Define HAVE_MULTIGROUP if system has simultaneous multiple group
- + * membership capability (BSD style).
- + */
- +
- + #define HAVE_MULTIGROUP
- +
- + /*
- * Define DETATCH_TERMINAL to be a command sequence which
- * will detatch a process from the control terminal
- * Also include system files needed to perform this HERE.
- *** /usr/storm/nn6.3.2/s-template.h Wed Jun 28 20:08:08 1989
- --- s-template.h Fri Sep 8 12:46:58 1989
- ***************
- *** 110,115 ****
- --- 110,127 ----
- #define HAVE_UNAME /* System V */
-
- /*
- + * Define HAVE_MULTIGROUP if system has simultaneous multiple group
- + * membership capability (BSD style).
- + * Also define NGROUPS or include the proper .h file if NGROUPS is
- + * not defined in <sys/param.h>.
- + * Also define GIDSET_TYPE to the type of the elements in the array
- + * initialized by getgroups() if different from "int" (many systems
- + * have a gid_t, but very few use it for getgroups()).
- + */
- +
- + /* #define HAVE_MULTIGROUP /* BSD */
- +
- + /*
- * Define DETATCH_TERMINAL to be a command sequence which
- * will detatch a process from the control terminal
- * Also include system files needed to perform this HERE.
- *** /usr/storm/nn6.3.4/s-xenix386.h Mon Jul 10 14:47:40 1989
- --- s-xenix386.h Fri Sep 8 12:46:58 1989
- ***************
- *** 124,129 ****
- --- 124,138 ----
- #define SHELL "/bin/sh"
-
- /*
- + * Define AVOID_SHELL_EXEC if the system gets confused by
- + * #!/bin/sh
- + * lines in shell scripts, e.g. only reads #! and thinks it
- + * is a csh script.
- + */
- +
- + #define AVOID_SHELL_EXEC /* */
- +
- + /*
- * Specify the default mailer to be invoked by nnmail
- */
-
- *** /usr/storm/nn6.3.4/save.c Mon Jul 10 13:36:29 1989
- --- save.c Fri Sep 8 12:46:59 1989
- ***************
- *** 12,18 ****
- --- 12,20 ----
- /* #define PAGED_OUTPUT /* does not work yet!! */
-
- export char *default_save_file = "+$F";
- + export char *unshar_header_file = "Unshar.Headers";
- export int use_mail_folders = 0;
- + export int use_mmdf_folders = 0;
- export int save_report = 1;
- export int quick_save = 0;
- export int conf_append = 0;
- ***************
- *** 307,314 ****
- if (save_mode & UNIQUE_FILES) {
- do {
- uniq_counter++;
- ! sprintf(save_name + counter_index,
- ! save_counter_format, uniq_counter);
- } while (file_exist(save_name, (char *)NULL));
-
- save_mode |= FILE_IS_NEW;
- --- 309,321 ----
- if (save_mode & UNIQUE_FILES) {
- do {
- uniq_counter++;
- ! sprintf(copybuf, save_counter_format, uniq_counter);
- ! if (strcmp(save_name + counter_index, copybuf) == 0) {
- ! msg("save-counter \"%s\" does not generate unique file names",
- ! save_counter_format);
- ! goto fatal;
- ! }
- ! strcpy(save_name + counter_index, copybuf);
- } while (file_exist(save_name, (char *)NULL));
-
- save_mode |= FILE_IS_NEW;
- ***************
- *** 316,335 ****
- if (save_mode & APPEND_ARTNUM)
- sprintf(save_name + counter_index, "%d", ah->a_number);
-
- ! if (save_mode & FILE_IS_NEW)
- if (save_mode & IS_PIPE) {
- if ((save_file = popen(save_name, "w")) == NULL) {
- msg("Cannot pipe to %s", save_name);
- ! fclose(art);
- ! return 0;
- }
- } else
- if (save_mode & DO_UNSHAR) {
- ! if ((save_mode & DO_PATCH) == 0 && !unshar_position(art)) {
- ! fclose(art);
- ! return 0;
- }
- ! was_raw = unset_raw();
- if (save_name)
- #ifdef PAGED_OUTPUT
- sprintf(copybuf, "cd %s && %s %s", save_name, unshar_cmd, pager_redir);
- --- 323,346 ----
- if (save_mode & APPEND_ARTNUM)
- sprintf(save_name + counter_index, "%d", ah->a_number);
-
- ! if (save_mode & FILE_IS_NEW) {
- ! if (save_mode & (IS_PIPE | DO_UNSHAR))
- ! was_raw = unset_raw();
- !
- if (save_mode & IS_PIPE) {
- if ((save_file = popen(save_name, "w")) == NULL) {
- msg("Cannot pipe to %s", save_name);
- ! goto fatal;
- }
- } else
- if (save_mode & DO_UNSHAR) {
- ! if ((save_mode & DO_PATCH) == 0) {
- ! if (!unshar_position(art))
- ! goto fatal;
- ! if (unshar_header_file)
- ! store_header(ah, art, save_name, unshar_header_file);
- }
- !
- if (save_name)
- #ifdef PAGED_OUTPUT
- sprintf(copybuf, "cd %s && %s %s", save_name, unshar_cmd, pager_redir);
- ***************
- *** 346,354 ****
- save_file = popen(copybuf, "w");
- if (save_file == NULL) {
- msg("Cannot exec: '%s'", copybuf);
- ! if (was_raw) raw();
- ! fclose(art);
- ! return 0;
- }
- #ifdef PAGED_OUTPUT
- fprintf(pager_stream, "\r\n%s %s\r\n",
- --- 357,363 ----
- save_file = popen(copybuf, "w");
- if (save_file == NULL) {
- msg("Cannot exec: '%s'", copybuf);
- ! goto fatal;
- }
- #ifdef PAGED_OUTPUT
- fprintf(pager_stream, "\r\n%s %s\r\n",
- ***************
- *** 369,386 ****
- if (ftell(save_file) != (off_t)0)
- save_mode &= ~FILE_IS_NEW;
- }
-
- clrline();
- s_pipe = 0;
-
- ! if (use_mail_folders && mode != NO_HEADER) {
- ! time_t now;
- ! char *ctime();
- !
- ! time(&now);
- ! fprintf(save_file, "From %s %s",
- ! current_group->group_name, ctime(&now));
- ! }
-
- if (mode == FULL_HEADER) {
- off_t cnt = ah->fpos - ah->hpos;
- --- 378,390 ----
- if (ftell(save_file) != (off_t)0)
- save_mode &= ~FILE_IS_NEW;
- }
- + }
-
- clrline();
- s_pipe = 0;
-
- ! if (mode != NO_HEADER)
- ! mailbox_format(save_file, 1);
-
- if (mode == FULL_HEADER) {
- off_t cnt = ah->fpos - ah->hpos;
- ***************
- *** 422,432 ****
- if (s_pipe) goto broken_pipe;
- }
-
- ! if (mode) {
- ! putc(NL, save_file);
- ! lcount++;
- ! }
- !
- broken_pipe:
- fclose(art);
-
- --- 426,434 ----
- if (s_pipe) goto broken_pipe;
- }
-
- ! if (mode != NO_HEADER)
- ! lcount += mailbox_format(save_file, 0);
- !
- broken_pipe:
- fclose(art);
-
- ***************
- *** 459,464 ****
- --- 461,471 ----
- ah->flag |= A_ST_FILED;
-
- return !s_pipe || (save_mode & SEPARATE_FILES);
- +
- + fatal:
- + if (was_raw) raw();
- + fclose(art);
- + return 0;
- }
-
-
- ***************
- *** 491,496 ****
- --- 498,556 ----
- #endif
- }
-
- + store_header(ah, f, dir, file)
- + article_header *ah;
- + FILE *f;
- + char *dir, *file;
- + {
- + register int c;
- + off_t endpos;
- + FILE *h;
- +
- + if (dir != (char *)NULL && file[0] != '/')
- + file = relative(dir, file);
- + if ((h = open_file(file, OPEN_APPEND)) == NULL) {
- + msg("Cannot open %s", file);
- + return;
- + }
- + fseek(h, (off_t)0, 2);
- + if (!use_mmdf_folders && ftell(h) > 0) putc(NL, h); /* just in case */
- + mailbox_format(f, 1);
- + endpos = ftell(f);
- + fseek(f, ah->hpos, 0);
- + while (--endpos >= 0 && (c = getc(f)) != EOF)
- + putc(c, h);
- +
- + mailbox_format(h, 0);
- + fclose(h);
- + }
- +
- + mailbox_format(f, top)
- + FILE *f;
- + int top;
- + {
- + time_t now;
- + char *ctime();
- +
- + if (use_mmdf_folders) {
- + fprintf(f, "\001\001\001\001\n");
- + return 0;
- + }
- +
- + if (top == 0) {
- + fputc(NL, f);
- + return 1;
- + }
- +
- + if (use_mail_folders) {
- + time(&now);
- + fprintf(f, "From %s %s",
- + current_group->group_name, ctime(&now));
- + return 1;
- + }
- +
- + return 0;
- + }
-
- char *run_mkdir(dir, name_buf)
- char *dir, *name_buf;
- *** /usr/storm/nn6.3.4/selection.c Mon Jul 10 13:36:30 1989
- --- selection.c Fri Sep 8 12:46:59 1989
- ***************
- *** 3,8 ****
- --- 3,9 ----
- */
-
- #include "config.h"
- + #include "term.h"
- #include "articles.h"
-
- #define SLMAGIC 0x536c6375
- *** /usr/storm/nn6.3.6/sequence.c Mon Sep 18 17:04:11 1989
- --- sequence.c Fri Sep 8 12:46:59 1989
- ***************
- *** 8,13 ****
- --- 8,14 ----
- export group_header *group_sequence;
- export char *read_mail = NULL;
- export int also_unsub_groups = 0;
- + export int also_subgroups = 1;
-
- static int seq_break_enabled = 1; /* !! enabled */
-
- ***************
- *** 40,45 ****
- --- 41,47 ----
- int found, any, errors;
-
- group_sequence = NULL;
- + also_subgroups = 0;
-
- any = errors = 0;
- while (group = *groups++) {
- ***************
- *** 141,147 ****
- static end_sequence()
- {
- register group_header *gh, *backp;
- !
- if (tail_sequence)
- tail_sequence->next_group = NULL;
-
- --- 143,150 ----
- static end_sequence()
- {
- register group_header *gh, *backp;
- ! register int seq_ix;
- !
- if (tail_sequence)
- tail_sequence->next_group = NULL;
-
- ***************
- *** 149,155 ****
- --- 152,160 ----
-
- backp = NULL;
- gh = group_sequence;
- + seq_ix = 0;
- while (gh) {
- + gh->preseq_index = ++seq_ix;
- gh->prev_group = backp;
- backp = gh;
- gh = gh->next_group;
- ***************
- *** 204,210 ****
- register group_header *gh;
- group_header *get_group_search();
- char group[FILENAME];
- ! char savefile[FILENAME], *dflt_save;
- register char *gp;
- int mode;
-
- --- 209,216 ----
- register group_header *gh;
- group_header *get_group_search();
- char group[FILENAME];
- ! char savefile[FILENAME], *dflt_save, *enter_macro;
- ! extern char *parse_enter_macro();
- register char *gp;
- int mode;
-
- ***************
- *** 290,307 ****
- } while (c != EOF && isascii(c) && !isspace(c));
- *gp = NUL;
- dflt_save = savefile[0] ? copy_str(savefile) : NULL;
- ! } else {
- dflt_save = NULL;
- if (c != EOF) ungetc(c, sf);
- }
-
- - use_same_savefile:
- -
- start_group_search(group);
-
- while (gh = get_group_search()) {
-
- gh->save_file = dflt_save;
-
- if (group_name_args == 0 &&
- (gh->group_flag & G_SUBSCRIPTION) == 0 && !also_unsub_groups)
- --- 296,319 ----
- } while (c != EOF && isascii(c) && !isspace(c));
- *gp = NUL;
- dflt_save = savefile[0] ? copy_str(savefile) : NULL;
- ! } else
- dflt_save = NULL;
- +
- + use_same_savefile:
- + while (c != EOF && (!isascii(c) || isspace(c))) c = getc(sf);
- + if (c == '(') {
- + enter_macro = parse_enter_macro(sf, getc(sf));
- + } else {
- + enter_macro = NULL;
- if (c != EOF) ungetc(c, sf);
- }
-
- start_group_search(group);
-
- while (gh = get_group_search()) {
-
- gh->save_file = dflt_save;
- + gh->enter_macro = enter_macro;
-
- if (group_name_args == 0 &&
- (gh->group_flag & G_SUBSCRIPTION) == 0 && !also_unsub_groups)
- ***************
- *** 383,388 ****
- --- 395,401 ----
-
- static char *gs_group;
- static int gs_length, gs_index, gs_mode;
- + static group_header *gs_only_group = NULL;
-
- #define GS_PREFIX 1 /* group. */
- #define GS_SUFFIX 2 /* .group */
- ***************
- *** 394,400 ****
- char *group;
- {
- char *dot;
- !
- if (strcmp(group, "NEW") == 0) {
- gs_mode = GS_NEW_GROUP;
- gs_length = 0;
- --- 407,422 ----
- char *group;
- {
- char *dot;
- ! int last;
- !
- ! gs_index = master.number_of_groups;
- ! if ((last = strlen(group) - 1) < 0) return;
- ! if (group[last] == '*')
- ! group[last] = NUL;
- ! else
- ! if (!also_subgroups && (gs_only_group = lookup(group)) != NULL)
- ! return;
- !
- if (strcmp(group, "NEW") == 0) {
- gs_mode = GS_NEW_GROUP;
- gs_length = 0;
- ***************
- *** 430,438 ****
- register group_header *gh;
- register int c, tail;
-
- while (gs_index < master.number_of_groups) {
- gh = sorted_groups[gs_index++];
- ! if (gh->group_flag & G_DONE) continue;
-
- gs_more_groups++;
-
- --- 452,468 ----
- register group_header *gh;
- register int c, tail;
-
- + if (gs_only_group != NULL) {
- + gh = gs_only_group;
- + gs_only_group = NULL;
- + if (gh->group_flag & (G_DONE | G_NO_DIRECTORY)) return NULL;
- + gh->group_flag |= G_DONE;
- + return gh;
- + }
- +
- while (gs_index < master.number_of_groups) {
- gh = sorted_groups[gs_index++];
- ! if (gh->group_flag & (G_DONE | G_NO_DIRECTORY)) continue;
-
- gs_more_groups++;
-
- *** /usr/storm/nn6.3.4/term.c Mon Jul 10 13:36:32 1989
- --- term.c Fri Sep 8 12:46:59 1989
- ***************
- *** 18,33 ****
- export int show_current_time = 1;
- export int conf_dont_sleep = 0;
- export int prompt_length;
- ! export int slow_mode = 0;
- export int any_message = 0;
- export int flow_control = 1;
-
- ! export char help_key = '?';
- ! export char comp1_key = SP;
- ! export char comp2_key = TAB;
- ! export char erase_key, kill_key;
- ! export char delword_key = CTRL('W');
-
- #ifdef USE_TERMINFO
-
- #include <curses.h>
- --- 18,37 ----
- export int show_current_time = 1;
- export int conf_dont_sleep = 0;
- export int prompt_length;
- ! export int terminal_speed;
- ! export int slow_speed = 1200;
- export int any_message = 0;
- export int flow_control = 1;
- + export int use_visible_bell = 1; /* if supported by terminal */
-
- ! export unsigned char help_key = '?';
- ! export unsigned char comp1_key = SP;
- ! export unsigned char comp2_key = TAB;
- ! export unsigned char erase_key, kill_key;
- ! export unsigned char delword_key = CONTROL_('W');
-
- + static char bell_str[256] = "\007";
- +
- #ifdef USE_TERMINFO
-
- #include <curses.h>
- ***************
- *** 49,54 ****
- --- 53,59 ----
- short ospeed;
-
- static char XBC[64], XUP[64];
- + static char enter_ca_mode[64], exit_ca_mode[64];
- static char cursor_home[64];
- static char cursor_address[64];
- static char clear_screen[64];
- ***************
- *** 56,62 ****
- static char clr_eos[64];
- static char enter_standout_mode[64], exit_standout_mode[64];
- static char enter_underline_mode[64], exit_underline_mode[64];
- - static char bell[256];
- static char key_down[64], key_up[64], key_right[64], key_left[64];
-
- int magic_cookie_glitch; /* magic cookie size */
- --- 61,66 ----
- ***************
- *** 86,97 ****
- #include <termio.h>
- #endif
-
- static struct termio norm_tty, raw_tty;
-
- #define IntrC norm_tty.c_cc[VINTR]
- #define EraseC norm_tty.c_cc[VERASE]
- #define KillC norm_tty.c_cc[VKILL]
- ! #define SuspC CTRL('Z') /* norm_tty.c_cc[SWTCH] */
-
- #else /* V7/BSD TTY DRIVER */
-
- --- 90,103 ----
- #include <termio.h>
- #endif
-
- + #undef CBREAK
- +
- static struct termio norm_tty, raw_tty;
-
- #define IntrC norm_tty.c_cc[VINTR]
- #define EraseC norm_tty.c_cc[VERASE]
- #define KillC norm_tty.c_cc[VKILL]
- ! #define SuspC CONTROL_('Z') /* norm_tty.c_cc[SWTCH] */
-
- #else /* V7/BSD TTY DRIVER */
-
- ***************
- *** 108,114 ****
- static struct ltchars spec_chars;
- #define SuspC spec_chars.t_suspc
- #else
- ! #define SuspC CTRL('Z')
- #endif
-
- #endif
- --- 114,120 ----
- static struct ltchars spec_chars;
- #define SuspC spec_chars.t_suspc
- #else
- ! #define SuspC CONTROL_('Z')
- #endif
-
- #endif
- ***************
- *** 192,202 ****
-
- #ifdef RESIZING
-
- ! sig_type winch()
- {
- struct winsize winsize;
-
- ! (void) signal(SIGWINCH, winch);
- if (ioctl(0, TIOCGWINSZ, &winsize) >= 0
- && (winsize.ws_row != Lines || winsize.ws_col != Columns)) {
- Lines = winsize.ws_row;
- --- 198,208 ----
-
- #ifdef RESIZING
-
- ! sig_type catch_winch()
- {
- struct winsize winsize;
-
- ! (void) signal(SIGWINCH, catch_winch);
- if (ioctl(0, TIOCGWINSZ, &winsize) >= 0
- && (winsize.ws_row != Lines || winsize.ws_col != Columns)) {
- Lines = winsize.ws_row;
- ***************
- *** 241,247 ****
- Lines = lines;
- cookie_size = magic_cookie_glitch;
- WRAP = auto_right_margin;
- ! if (HAS_CAP(flash_screen)) strcpy(bell, flash_screen);
- if (! HAS_CAP(cursor_home))
- cursor_home = copy_str(tgoto(cursor_address, 0, 0));
- #else
- --- 247,256 ----
- Lines = lines;
- cookie_size = magic_cookie_glitch;
- WRAP = auto_right_margin;
- ! if (use_visible_bell && HAS_CAP(flash_screen))
- ! strcpy(bell_str, flash_screen);
- ! else if (HAS_CAP(bell))
- ! strcpy(bell_str, bell);
- if (! HAS_CAP(cursor_home))
- cursor_home = copy_str(tgoto(cursor_address, 0, 0));
- #else
- ***************
- *** 270,276 ****
- && winsize.ws_row != 0 && winsize.ws_col != 0) {
- Lines = winsize.ws_row;
- Columns = winsize.ws_col;
- ! (void) signal(SIGWINCH, winch);
- #ifdef SV_INTERRUPT
- siginterrupt(SIGWINCH, 1); /* make read from tty interruptable */
- #endif /* SV_INTERRUPT */
- --- 279,285 ----
- && winsize.ws_row != 0 && winsize.ws_col != 0) {
- Lines = winsize.ws_row;
- Columns = winsize.ws_col;
- ! (void) signal(SIGWINCH, catch_winch);
- #ifdef SV_INTERRUPT
- siginterrupt(SIGWINCH, 1); /* make read from tty interruptable */
- #endif /* SV_INTERRUPT */
- ***************
- *** 299,306 ****
-
- WRAP = tgetflag("am");
-
- ! if (!opt_cap("vb", bell) && !opt_cap("bl", bell))
- ! strcpy(bell, "\007");
-
- #endif /* !USE_TERMINFO */
-
- --- 308,319 ----
-
- WRAP = tgetflag("am");
-
- ! opt_cap("ti", enter_ca_mode);
- ! opt_cap("te", exit_ca_mode);
- !
- ! if (!use_visible_bell || !opt_cap("vb", bell_str))
- ! if (!opt_cap("bl", bell_str))
- ! strcpy(bell_str, "\007");
-
- #endif /* !USE_TERMINFO */
-
- ***************
- *** 323,329 ****
- /* read a maximum of 10 characters in one burst; timeout in 1-200 ms */
- raw_tty.c_cc[VEOF] = KEY_BURST;
- raw_tty.c_cc[VEOL] = ((raw_tty.c_cflag & CBAUD) > B1200) ? 1 : 2;
- !
- #else
- ioctl(0, TIOCGETC, &norm_chars);
-
- --- 336,342 ----
- /* read a maximum of 10 characters in one burst; timeout in 1-200 ms */
- raw_tty.c_cc[VEOF] = KEY_BURST;
- raw_tty.c_cc[VEOL] = ((raw_tty.c_cflag & CBAUD) > B1200) ? 1 : 2;
- ! set_term_speed((unsigned)(raw_tty.c_cflag & CBAUD));
- #else
- ioctl(0, TIOCGETC, &norm_chars);
-
- ***************
- *** 332,341 ****
- #endif
-
- ospeed = norm_tty.sg_ospeed;
- ! if (ospeed < B2400) slow_mode++;
-
- raw_tty.sg_flags |= RAW;
- ! raw_tty.sg_flags &= ~(ECHO|CRMOD);
-
- #ifdef SV_INTERRUPT
- siginterrupt(SIGALRM, 1); /* make read from tty interruptable */
- --- 345,361 ----
- #endif
-
- ospeed = norm_tty.sg_ospeed;
- ! set_term_speed((unsigned)ospeed);
-
- + raw_tty.sg_flags &= ~ECHO;
- + #ifdef CBREAK
- + #ifdef SV_INTERRUPT /* make read from tty interruptable */
- + siginterrupt(SIGTSTP, 1); /* this is necessary to redraw screen */
- + #endif
- + raw_tty.sg_flags |= CBREAK;
- + #else
- raw_tty.sg_flags |= RAW;
- ! #endif
-
- #ifdef SV_INTERRUPT
- siginterrupt(SIGALRM, 1); /* make read from tty interruptable */
- ***************
- *** 349,354 ****
- --- 369,413 ----
-
- erase_key = EraseC;
- kill_key = KillC;
- +
- + visual_on();
- + }
- +
- + static unsigned sp_table[] = {
- + B9600, 960,
- + #ifdef B19200
- + B19200, 1920,
- + #else
- + #ifdef EXTA
- + EXTA, 1920,
- + #endif
- + #endif
- + #ifdef B38400
- + B38400, 3840,
- + #else
- + #ifdef EXTB
- + EXTB, 3840,
- + #endif
- + #endif
- + B1200, 120,
- + B2400, 240,
- + B4800, 480,
- + B300, 30,
- + 0, 0
- + };
- +
- + static set_term_speed(sp)
- + register unsigned long sp;
- + {
- + register unsigned *tp;
- +
- + for (tp = sp_table; *tp; tp += 2)
- + if (*tp == sp) {
- + terminal_speed = tp[1];
- + return;
- + }
- +
- + terminal_speed = 30;
- }
-
- home()
- ***************
- *** 356,363 ****
- --- 415,437 ----
- putp(cursor_home);
- }
-
- + static int curxy_c = -1, curxy_l, savxy_c = -1, savxy_l;
- +
- + save_xy()
- + {
- + savxy_c = curxy_c; savxy_l = curxy_l;
- + }
- +
- + restore_xy()
- + {
- + if (savxy_c < 0) return;
- + gotoxy(savxy_c, savxy_l); fl;
- + }
- +
- gotoxy(c, l)
- + int c, l;
- {
- + curxy_c = c; curxy_l = l;
- putp(tgoto(cursor_address, c, l));
- }
-
- ***************
- *** 368,373 ****
- --- 442,448 ----
- #else
- tputs(clear_screen, Lines, outc);
- #endif
- + curxy_c = savxy_c = -1;
- }
-
- clrline()
- ***************
- *** 523,531 ****
- --- 598,623 ----
- return 1;
- }
-
- + static int is_visual = 0;
- +
- + visual_on()
- + {
- + if (HAS_CAP(enter_ca_mode)) {
- + putp(enter_ca_mode);
- + is_visual = 1;
- + }
- + }
- +
- + visual_off()
- + {
- + if (is_visual && HAS_CAP(exit_ca_mode)) putp(exit_ca_mode), fl;
- + is_visual = 0;
- + }
- +
- static int is_raw = 0;
- static int must_set_raw = 1;
-
- + #ifndef CBREAK
- raw()
- {
- if (!flow_control) {
- ***************
- *** 572,577 ****
- --- 664,693 ----
- return was_raw;
- }
-
- + #else /* not CBREAK */
- + raw()
- + {
- + if (is_raw == 1)
- + return;
- + is_raw = 1;
- + ioctl(0, TIOCSETP, &raw_tty); /* no TERMIO ??? */
- + }
- +
- + no_raw()
- + {
- + return 0;
- + }
- +
- + unset_raw()
- + {
- + if (is_raw == 0)
- + return 0;
- + ioctl(0, TIOCSETP, &norm_tty); /* no TERMIO ??? */
- + is_raw = 0;
- + return 1;
- + }
- + #endif /* CBREAK */
- +
- flush_input()
- {
- #ifdef HAVE_TERMIO
- ***************
- *** 651,657 ****
- c &= 0177; /* done by ISTRIP on USG systems */
- #endif
-
- ! if (c == CTRL('Q') || c == CTRL('S'))
- continue;
-
- any_multi = 0;
- --- 767,773 ----
- c &= 0177; /* done by ISTRIP on USG systems */
- #endif
-
- ! if (c == CONTROL_('Q') || c == CONTROL_('S'))
- continue;
-
- any_multi = 0;
- ***************
- *** 687,692 ****
- --- 803,815 ----
- goto next_key;
- }
-
- + #ifdef CBREAK
- + if (s_redraw) {
- + s_redraw = 0;
- + return GETC_COMMAND | K_REDRAW;
- + }
- + #endif
- +
- #ifndef KEY_BURST
- if (n < 0) {
- if (errno != EINTR) s_hangup++;
- ***************
- *** 717,722 ****
- --- 840,846 ----
-
- c = global_key_map[c];
-
- + #ifndef CBREAK
- if (c == SuspC) {
- if (!enable_stop) goto next_key;
- if (suspend_nn())
- ***************
- *** 726,732 ****
- }
-
- if (c == IntrC) c = K_interrupt;
- !
- return c;
- }
-
- --- 850,856 ----
- }
-
- if (c == IntrC) c = K_interrupt;
- ! #endif
- return c;
- }
-
- ***************
- *** 800,806 ****
- for(;;) {
- lastc = c;
- c = get_c();
- ! if (c & (0200 | GETC_COMMAND)) continue;
-
- kill_prefill_hack:
-
- --- 924,930 ----
- for(;;) {
- lastc = c;
- c = get_c();
- ! if (c & GETC_COMMAND) continue;
-
- kill_prefill_hack:
-
- ***************
- *** 942,948 ****
- break;
- }
-
- ! if (c < SP) continue;
-
- if (i == max) continue;
-
- --- 1066,1072 ----
- break;
- }
-
- ! if (!isascii(c) || !isprint(c)) continue;
-
- if (i == max) continue;
-
- ***************
- *** 1044,1050 ****
- }
-
- if (in_macro) {
- ! if (c <= 0) m_break();
- do_macro_processing = 1;
- }
-
- --- 1168,1174 ----
- }
-
- if (in_macro) {
- ! if (c < 0) m_break();
- do_macro_processing = 1;
- }
-
- ***************
- *** 1054,1060 ****
-
- ding()
- {
- ! putp(bell);
- fl;
- }
-
- --- 1178,1184 ----
-
- ding()
- {
- ! putp(bell_str);
- fl;
- }
-
- ***************
- *** 1235,1240 ****
- --- 1359,1365 ----
- int stand_on;
- char *fmt;
- static char cur_p[FILENAME];
- + static char saved_p[FILENAME];
- va_list ap;
-
- va_start(ap);
- ***************
- *** 1252,1257 ****
- --- 1377,1390 ----
- return;
- }
-
- + if (fmt == P_SAVE) {
- + strcpy(saved_p, cur_p);
- + return;
- + }
- +
- + if (fmt == P_RESTORE)
- + strcpy(cur_p, saved_p);
- +
- if (prompt_line >= 0)
- gotoxy(0, prompt_line);
-
- ***************
- *** 1260,1266 ****
- return;
- }
-
- ! if (fmt != P_REDRAW)
- vsprintf(cur_p, fmt, va_args2toN);
-
- putchar('\r');
- --- 1393,1399 ----
- return;
- }
-
- ! if (fmt != P_REDRAW && fmt != P_RESTORE)
- vsprintf(cur_p, fmt, va_args2toN);
-
- putchar('\r');
- ***************
- *** 1314,1319 ****
- --- 1447,1457 ----
- }
-
- clrline();
- +
- + if (fmt == P_RESTORE)
- + restore_xy();
- + else
- + curxy_c = -1;
- }
-
-
- *** /usr/storm/nn6.3.4/term.h Mon Jul 10 13:36:33 1989
- --- term.h Fri Sep 8 12:47:00 1989
- ***************
- *** 12,17 ****
- --- 12,19 ----
-
- extern so_gotoxy(), so_printf(), so_end();
-
- + extern no_raw(), raw(), unset_raw();
- +
- extern int Lines, Columns;
- extern int cookie_size;
- extern int WRAP, STANDOUT;
- ***************
- *** 27,33 ****
-
- /* special keys returned by get_c() */
-
- ! #define K_interrupt CTRL('G')
-
- #define K_up_arrow 0x0081
- #define K_down_arrow 0x0082
- --- 29,35 ----
-
- /* special keys returned by get_c() */
-
- ! #define K_interrupt CONTROL_('G')
-
- #define K_up_arrow 0x0081
- #define K_down_arrow 0x0082
- ***************
- *** 57,63 ****
- #define P_MOVE (char *)1
- #define P_REDRAW (char *)5
- #define P_VERSION (char *)9
- !
-
- extern display_file();
-
- --- 59,66 ----
- #define P_MOVE (char *)1
- #define P_REDRAW (char *)5
- #define P_VERSION (char *)9
- ! #define P_SAVE (char *)13
- ! #define P_RESTORE (char *)17
-
- extern display_file();
-
- *** /usr/storm/nn6.3.4/variable.c Mon Jul 10 13:36:34 1989
- --- variable.c Fri Sep 8 12:47:00 1989
- ***************
- *** 7,12 ****
- --- 7,13 ----
- import in_init;
-
- import char /* string variables */
- + *decode_header_file,
- *default_distribution,
- *default_save_file,
- *extra_mail_headers,
- ***************
- *** 20,30 ****
- *pager,
- *patch_cmd,
- printer[],
- ! *save_counter_format;
-
- import int /* boolean variables */
- also_cross_postings,
- conf_append,
- conf_dont_sleep,
- delay_redraw,
- do_kill_handling,
- --- 21,35 ----
- *pager,
- *patch_cmd,
- printer[],
- ! *save_counter_format,
- ! *unshar_header_file;
-
- import int /* boolean variables */
- also_cross_postings,
- + also_subgroups,
- + compress_mode,
- conf_append,
- + conf_auto_quit,
- conf_dont_sleep,
- delay_redraw,
- do_kill_handling,
- ***************
- *** 43,64 ****
- novice,
- quick_save,
- save_report,
- show_article_date,
- show_current_time,
- silent,
- use_mail_folders,
- ! use_newsrc;
-
- import int /* integer variables */
- also_read_articles,
- article_limit,
- Debug,
- first_page_lines,
- fmt_linenum,
- Lines,
- overlap,
- preview_window,
- ! retry_on_error;
-
- import char /* key strokes */
- comp1_key,
- --- 48,79 ----
- novice,
- quick_save,
- save_report,
- + seq_cross_filtering,
- show_article_date,
- show_current_time,
- silent,
- + slow_mode,
- use_mail_folders,
- ! use_mmdf_folders,
- ! use_newsrc,
- ! use_visible_bell;
-
- import int /* integer variables */
- also_read_articles,
- article_limit,
- + collapse_subject,
- + Columns,
- Debug,
- first_page_lines,
- fmt_linenum,
- Lines,
- + min_pv_window,
- overlap,
- preview_window,
- ! re_layout,
- ! retry_on_error,
- ! slow_speed,
- ! wrap_headers;
-
- import char /* key strokes */
- comp1_key,
- ***************
- *** 80,95 ****
- char var_op;
- char **var_addr;
- } variables[] = {
- "backup", V_BOOLEAN, 3, (char **)&keep_rc_backup,
- "comp1_key", V_KEY, 0, (char **)&comp1_key,
- "comp2_key", V_KEY, 0, (char **)&comp2_key,
- ! "confirm", V_BOOLEAN, 0, (char **)&conf_dont_sleep,
- "confirm-append", V_BOOLEAN, 0, (char **)&conf_append,
- "cross-post", V_BOOLEAN, 0, (char **)&also_cross_postings,
- "date", V_BOOLEAN, 0, (char **)&show_article_date,
- "debug", V_INTEGER, 0, (char **)&Debug,
- "default-distribution",V_STRING, 0, (char **)&default_distribution,
- ! "default-save-file",V_STRING, 0, (char **)&default_save_file,
- "delay-redraw", V_BOOLEAN, 0, (char **)&delay_redraw,
- "erase-key", V_KEY, 0, (char **)&erase_key,
- "expert", V_BOOLEAN, 4, (char **)&novice,
- --- 95,117 ----
- char var_op;
- char **var_addr;
- } variables[] = {
- + "also-subgroups", V_BOOLEAN, 3, (char **)&also_subgroups,
- "backup", V_BOOLEAN, 3, (char **)&keep_rc_backup,
- + "collapse-subject", V_INTEGER, 3, (char **)&collapse_subject,
- + "columns", V_INTEGER, 1, (char **)&Columns,
- "comp1_key", V_KEY, 0, (char **)&comp1_key,
- "comp2_key", V_KEY, 0, (char **)&comp2_key,
- ! "compress", V_BOOLEAN, 0, (char **)&compress_mode,
- "confirm-append", V_BOOLEAN, 0, (char **)&conf_append,
- + "confirm-auto-quit",V_BOOLEAN, 0, (char **)&conf_auto_quit,
- + "confirm-messages", V_BOOLEAN, 0, (char **)&conf_dont_sleep,
- + "cross-filter-seq", V_BOOLEAN, 0, (char **)&seq_cross_filtering,
- "cross-post", V_BOOLEAN, 0, (char **)&also_cross_postings,
- "date", V_BOOLEAN, 0, (char **)&show_article_date,
- "debug", V_INTEGER, 0, (char **)&Debug,
- + "decode-header-file",V_STRING, 0, (char **)&decode_header_file,
- "default-distribution",V_STRING, 0, (char **)&default_distribution,
- ! "default-save-file",V_STRING, 3, (char **)&default_save_file,
- "delay-redraw", V_BOOLEAN, 0, (char **)&delay_redraw,
- "erase-key", V_KEY, 0, (char **)&erase_key,
- "expert", V_BOOLEAN, 4, (char **)&novice,
- ***************
- *** 103,109 ****
- "kill", V_BOOLEAN, 0, (char **)&do_kill_handling,
- "kill-key", V_KEY, 0, (char **)&kill_key,
- "layout", V_INTEGER, 1, (char **)&fmt_linenum,
- ! "limit", V_INTEGER, 0, (char **)&article_limit,
- "lines", V_INTEGER, 1, (char **)&Lines,
- "long-menu", V_BOOLEAN, 1, (char **)&long_menu,
- "macro-debug", V_BOOLEAN, 0, (char **)¯o_debug,
- --- 125,131 ----
- "kill", V_BOOLEAN, 0, (char **)&do_kill_handling,
- "kill-key", V_KEY, 0, (char **)&kill_key,
- "layout", V_INTEGER, 1, (char **)&fmt_linenum,
- ! "limit", V_INTEGER, 2, (char **)&article_limit,
- "lines", V_INTEGER, 1, (char **)&Lines,
- "long-menu", V_BOOLEAN, 1, (char **)&long_menu,
- "macro-debug", V_BOOLEAN, 0, (char **)¯o_debug,
- ***************
- *** 112,117 ****
- --- 134,141 ----
- "mail-header", V_STRING, 0, (char **)&extra_mail_headers,
- "mail-record", V_STRING, 2, (char **)&mail_record,
- "mark-overlap", V_BOOLEAN, 0, (char **)&mark_overlap,
- + "min-window", V_INTEGER, 1, (char **)&min_pv_window,
- + "mmdf-format", V_BOOLEAN, 0, (char **)&use_mmdf_folders,
- "monitor", V_BOOLEAN, 0, (char **)&monitor_mode,
- "news-header", V_STRING, 0, (char **)&extra_news_headers,
- "news-record", V_STRING, 2, (char **)&news_record,
- ***************
- *** 119,140 ****
- "nn-re-style", V_BOOLEAN, 0, (char **)&nn_re_style,
- "old", V_SPECIAL, 2, (char **)NULL,
- "overlap", V_INTEGER, 0, (char **)&overlap,
- ! "pager", V_STRING, 0, (char **)&pager,
- ! "patch-cmd", V_STRING, 0, (char **)&patch_cmd,
- "printer", V_STRING, 1, (char **)printer,
- "quick-save", V_BOOLEAN, 0, (char **)&quick_save,
- "record", V_SPECIAL, 1, (char **)NULL,
- "repeat", V_BOOLEAN, 0, (char **)&fmt_rptsubj,
- "retry-on-error", V_INTEGER, 0, (char **)&retry_on_error,
- ! "save-counter", V_STRING, 0, (char **)&save_counter_format,
- "save-report", V_BOOLEAN, 0, (char **)&save_report,
- "silent", V_BOOLEAN, 0, (char **)&silent,
- "sort", V_BOOLEAN, 2, (char **)&dont_sort_articles,
- "split", V_BOOLEAN, 4, (char **)&dont_split_digests,
- "stop", V_INTEGER, 0, (char **)&first_page_lines,
- "time", V_BOOLEAN, 0, (char **)&show_current_time,
- "window", V_INTEGER, 1, (char **)&preview_window,
- ! "word-key", V_KEY, 0, (char **)&delword_key
- };
-
- #define TABLE_SIZE (sizeof(variables)/sizeof(struct variable_defs))
- --- 143,170 ----
- "nn-re-style", V_BOOLEAN, 0, (char **)&nn_re_style,
- "old", V_SPECIAL, 2, (char **)NULL,
- "overlap", V_INTEGER, 0, (char **)&overlap,
- ! "pager", V_STRING, 3, (char **)&pager,
- ! "patch-cmd", V_STRING, 3, (char **)&patch_cmd,
- "printer", V_STRING, 1, (char **)printer,
- "quick-save", V_BOOLEAN, 0, (char **)&quick_save,
- + "re-layout", V_INTEGER, 0, (char **)&re_layout,
- "record", V_SPECIAL, 1, (char **)NULL,
- "repeat", V_BOOLEAN, 0, (char **)&fmt_rptsubj,
- "retry-on-error", V_INTEGER, 0, (char **)&retry_on_error,
- ! "save-counter", V_STRING, 3, (char **)&save_counter_format,
- "save-report", V_BOOLEAN, 0, (char **)&save_report,
- "silent", V_BOOLEAN, 0, (char **)&silent,
- + "slow-mode", V_BOOLEAN, 0, (char **)&slow_mode,
- + "slow-speed", V_INTEGER, 0, (char **)&slow_speed,
- "sort", V_BOOLEAN, 2, (char **)&dont_sort_articles,
- "split", V_BOOLEAN, 4, (char **)&dont_split_digests,
- "stop", V_INTEGER, 0, (char **)&first_page_lines,
- "time", V_BOOLEAN, 0, (char **)&show_current_time,
- + "unshar-header-file",V_STRING, 0, (char **)&unshar_header_file,
- + "visible-bell", V_BOOLEAN, 0, (char **)&use_visible_bell,
- "window", V_INTEGER, 1, (char **)&preview_window,
- ! "word-key", V_KEY, 0, (char **)&delword_key,
- ! "wrap-header-margin",V_INTEGER, 2, (char **)&wrap_headers
- };
-
- #define TABLE_SIZE (sizeof(variables)/sizeof(struct variable_defs))
- ***************
- *** 143,149 ****
- #define BOOL_VAR (*((int *)(var->var_addr)))
- #define STR_VAR (*(var->var_addr))
- #define CBUF_VAR ((char *)(var->var_addr))
- ! #define KEY_VAR (*((char *)(var->var_addr)))
-
-
- static struct variable_defs *lookup_variable(variable)
- --- 173,179 ----
- #define BOOL_VAR (*((int *)(var->var_addr)))
- #define STR_VAR (*(var->var_addr))
- #define CBUF_VAR ((char *)(var->var_addr))
- ! #define KEY_VAR (*((unsigned char *)(var->var_addr)))
-
-
- static struct variable_defs *lookup_variable(variable)
- ***************
- *** 199,214 ****
-
- switch (var->var_op) {
- case 0:
- ! if (val_string) STR_VAR = copy_str(val_string);
- break;
-
- case 1:
- ! if (val_string) strcpy(CBUF_VAR, val_string);
- break;
-
- case 2:
- ! adjust(val_string);
- ! if (val_string) STR_VAR = home_relative(val_string);
- break;
- }
- break;
- --- 229,255 ----
-
- switch (var->var_op) {
- case 0:
- ! STR_VAR = (on && val_string) ? copy_str(val_string) : (char *)NULL;
- break;
-
- case 1:
- ! strcpy(CBUF_VAR, (on && val_string) ? val_string : "");
- break;
-
- case 2:
- ! if (on) {
- ! adjust(val_string);
- ! if (val_string) STR_VAR = home_relative(val_string);
- ! } else
- ! STR_VAR = (char *)NULL;
- ! break;
- !
- ! case 3:
- ! if (!on || val_string == NULL) {
- ! msg("Cannot unset string `%s'", variable);
- ! break;
- ! }
- ! STR_VAR = copy_str(val_string);
- break;
- }
- break;
- ***************
- *** 255,268 ****
-
- switch (var->var_op) {
- case 0:
- INT_VAR = value;
- break;
- !
- ! case 1:
- ! INT_VAR = value;
- ! return 1;
- }
- ! break;
-
- case V_KEY:
- switch (var->var_op) {
- --- 296,312 ----
-
- switch (var->var_op) {
- case 0:
- + case 1:
- INT_VAR = value;
- break;
- !
- ! case 2:
- ! case 3:
- ! if (!on) value = -1;
- ! INT_VAR = value;
- ! break;
- }
- ! return (var->var_op & 1);
-
- case V_KEY:
- switch (var->var_op) {
- ***************
- *** 288,294 ****
-
- case 2:
- also_read_articles = on;
- ! article_limit = value;
- break;
- }
- break;
- --- 332,338 ----
-
- case 2:
- also_read_articles = on;
- ! article_limit = (on && value > 0) ? value : -1;
- break;
- }
- break;
-